Tangible Bytes

A Web Developer’s Blog

Hugo Shortcode

I wanted to use an html <aside> block in my blog and this isn’t supported by Markdown

It’s fairly easy to implement as a hugo shortcode though

I created a file (path from the root of my hugo site)

layouts/shortcodes/aside.html

<aside>
  {{/* .Inner | markdownify */}}
</aside>

Then in my markdown content

{{< aside >}}

This is an aside

{{< /aside >}}

and with the help of some CSS it looks like this (with an actual aside as I go down another rabbithole)