Does anyone have an example of a working render hook using “Attributes (map)” working, specifically for class and id? The docs say it’s possible for v0.82.0 (which I have) but there is no example of how to use it for both the markdown and the HTML equivalent.
My use case: I have a link in the middle of a markdown file that needs to have a certain ID on it, so I can “select” it via JavaScript. I’m lost as to what the Markdown Syntax and the HTML syntax is for id and class for the “render-link.html” render hook placed inside of “layouts/_default/_markup/render-link.html”
Perhaps it is possible -in markdown file- to wrap the link with a shortcode {{<link-with-id id = "link-id">}} link {{</ link-with-id>}}
And then in the shortcode file replace the content of the <a> tag using Hugo’s replace function. https://gohugo.io/functions/replace/
Similar to what is suggested here: