I was looking for a way to include HTML snippets into Hugo posts. The magic formula includes shortcode templates and readFile. Hugo’s shortcode templates are a very neat way to bring custom, reusable pieces of HTML into your posts. It’s as simple as adding a file into the layouts/shortcodes folder. The full file structure of this example looks like this: ┌─ content │ └─ posts │ └─ example │ ├─ index.