Fix display of permalink in template