Hi folks. I’m learning hugo so any help with this would be hugely appreciated!
I have .md articles in my content folder which are all rendered in a standard way via {{ .Content }}
I’d like to have each header (h1,h2…etc) and coresponding paragraphs wrapped in a div so that I can control layout and styles. The last thing I want to do is add html into the markdown!
I’ve read a bit about shortcodes and split functions but a good way forwards isn’t very clear.
I’ll look at render hooks but I’ve also attached a jpg to show a rough idea of the layout aim. The red box would be a div of some type or section, whatever, with the aim of having the header line up with corresponding paragraphs.
Thanks peaceiris…this could be the slickest way of doing what I need.
I’ve just used replaceRE to achieve figure tags around img which seems to work although there is a lof of code in the html.
Anyway, I’ll dig into this and mark as solution if I can get it working.
As a side note for anybody reading this…My quick solution for layout image above was to simply add an hr into my markdown where needed – which is just (-----), so seems pretty workable. CSS set to display block and width 100%.