Hugo References #
Within the site #
Hugo makes it super easy to inter-link within the site.
Pure markdown #
[<description>](<relative path>)
For instance:
[target.md in a common directory](../target)
Shortcodes #
This one’s really nifty - references can be made based on the unique filename of an .md
on the site. This does require uniqueness.
Note: Remove the backslashes in the following snippets when using. I had to add them to escape the references being used.
\{\{< ref "<unique file name>" >}}
With an anchor:
\{\{< ref "<unique file name>#<section>" >}}
On page #
To a section on page:
\{\{< ref "#<section>" >}}