Add permalinks support.

Resolves #12.