pass permalinks to post in templates