Markdown Linebreak in Hugo
My primary website uses Hugo for a variety of reasons and for the most part, I love it…except when you run into odd edge-cases and the latest one: line-breaks using Markdown aka the <br />
tag.
After a little bit of research, I ended up creating a custom shortcode to handle the need / issue, naming it “line-break.html”:
To use the shortcode, I add [[< line-break >]]
(I used regular brackets here, instead of curly ones, so this shortcode wouldn’t trip up Hugo) into my various markdown files and voila: line-breaks in the generated HTML!