Found 6 bookmarks
Custom sorting
Hugo Wikilink Support | Quinn Casey
Hugo Wikilink Support | Quinn Casey
The static site generator Hugo doesn’t yet support Wikilinks. This is being considered on this github issue, but in the meantime we need to parse each page’s content to replace wikilinks with a relref internal page link. I use the following code snippet to support wikilinks in Hugo. It can be invoked when you’d normally use {{ .Content }} by calling this instead: {{- partial "content-with-wikilinks" . -}}. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 {{/* Prints page content with two types of wikilinks rendered (with and without text).
·quinncasey.com·
Hugo Wikilink Support | Quinn Casey
Parsing Backlinks in Hugo ❚ A Scripter's Notes
Parsing Backlinks in Hugo ❚ A Scripter's Notes
As of writing this (%3C2022-04-19%20Tue%3E), Hugo doesn’t have a built-in way to generate a list of such backlinks, though there’s an open issue (# 8077) to track this feature request. One way to gather a list of backlinks to a post is to find out that post’s relative or absolute permalink, and search for the occurrences of that link in all the other posts on the published site. The author of seds.nl: Export org-roam backlinks with Gohugo, Ben Mezger, uses this approach in his solution for creating backlinks in that post. In this post, I am expanding upon that solution and refactoring it bit to fit my needs.
·scripter.co·
Parsing Backlinks in Hugo ❚ A Scripter's Notes