bm.deuts.org
March 5, 2025
14:14
Relative Markdown Links in Hugo
The minimal example for relative markdown links:
[My Article](../my-article/index.md)
Template:
/layouts/_default/_markup/render-link.html
:<a href="{{ (.Page.GetPage .Destination).RelPermalink | safeURL }}"> {{ .Text | safeHTML }} </a>
This solves the problem of relative markdown links to other pages in Hugo.