Hugo: siteparams equivalent to ref / relref?

180 Views Asked by At

Part of Hugo's feature-set is a really useful ability to provide links to pages in markdown through the the use of shortcodes.

Unfortunately, shortcodes only work on markdown files (not on html files, partials, etc.).

Is there a way to do something similar in html files?

1

There are 1 best solutions below

0
Rogelio On

It depends on what problem you are trying to solve. But working with pages and relative vs absolute links and how to resolve is covered here:

https://gohugo.io/functions/getpage/#getpage-example

Also conversion to relative URLs and vice versa:

https://gohugo.io/functions/getpage/#getpage-example
https://gohugo.io/functions/absurl/