Best practice for linking between pages?

What’s the best practice for linking between pages on my site? (I seem to remember there being another method other than linking as you would to an external site.) Thanks you!

Enable the embedded link render hook:

[markup.goldmark.renderHooks.link]
enableDefault = true

Then reference the target page using its logical path. Consider this content structure:

content/
├── posts/
│   ├── post-3/
│   │   ├── bryce-canyon.jpg
│   │   └── index.md
│   ├── _index.md
│   ├── post-1.md
│   └── post-2.md
└── _index.md

To link from anywhere to post-1:

[post 1](/posts/post-1)

To link from anywhere to post-3:

[post 3](/posts/post-3)

I would enable the embedded image render hook as well:

[markup.goldmark.renderHooks.image]
enableDefault = true

Note that embedded link and image render hooks are automatically enabled for multilingual single-host sites.

Enabling these embedded render hooks addresses the challenges described in this article.

To enable the embedded link render hook, do I just copy that code somewhere into the hugo.toml file or markup.toml file? I seem to still be running into issues…

To enable the hooks just add this to your hugo.toml file:

[markup.goldmark.renderHooks.image]
enableDefault = true

[markup.goldmark.renderHooks.link]
enableDefault = true

If you have organized your configuration in a directory and have moved the markup configuration to its own file (e.g., config/_default/markup.toml), add this instead:

[goldmark.renderHooks.image]
enableDefault = true

[goldmark.renderHooks.link]
enableDefault = true

If you need additional help please share a link to your project repo.