add permalink to document and to page