- Having code in content is a bad idea in general (I could debate the “why” here, but there are plenty of resources online)
- Shortcodes is a good compromise, it supplies a fine separation of content and logic/layout
- With Hugo >= 0.24 you can use full template syntax in Archetype files used by
hugo new, which is cooler than it sounds.
2 Likes