Render hooks, shortcodes and Goldmark - which one is executed first?

Hi all,

I’m new to Hugo and to get familiar with the code, I’m working on some open issues on GitHub. I often stumble upon old legacy code such as Blackfriday’s, and I’m quite confused.

Right now I’m trying to understand the order in which the followings are executed:

  • Markdown render hooks
  • Shortcodes
  • Goldmark

The doc is not clear on that matter. From Content Formats | Hugo :

  • Markdown converted to HTML [Goldmark?]
  • Shortcodes processed [Shortcodes]
  • Layout applied

but I don’t know if it’s accurate. And render hooks? Before Goldmark?

Any help is appreciated (and some quick refs to where in the code I can find the calls would be great!)

Thank you
Duccio

1 Like