Hugo: Customize Your Markdown Links

How to add cross reference support, link icons, and more in Hugo Markdown links.

 ·  ☕ 1 min read  · 
❄️ ᜌᜓᜃᜒ (Yuki)
    Fediverse Follow

    Are you looking for ways to customize how Markdown links are rendered in Hugo? Maybe you want to add link icons? Or, how about add support for internal cross reference without using (the old method) {{< ref >}}?

    Hugo has a feature called Markdown render hooks which allow custom templates to override markdown rendering functionality 1. It currently supports four, commonly requested, Markdown rendering areas:

    • codeblock
    • heading
    • image
    • link

    Here are various ways to customize how Markdown links in Hugo can be rendered.