Hugo: Customize Your Markdown Links

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

 ·  ☕ 1 min read  · 
❄️ Yohan Yukiya Sese-Cuneta
    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.