2 ms·
Hugo 0.62 added Markdown rendering hooks so you can do custom processing of a standard markdown image. I was able to use this to get rid of my <figure> shortco
by fsflyer 6y ago
Hugo 0.62 added Markdown rendering hooks so you can do custom processing of a standard markdown image. I was able to use this to get rid of my <figure> shortcodes. The render hook generates the figure tag and also uses Hugo image processing to generate multiple image sizes for srcset.
This way I'm able to keep the markdown completely standard which makes it easier to move to a new platform in the future.