{{ }} not parsed in content/


I’m wondering why {{ add 1 2 }} are parsed in files in layouts/ but not in files in content/.


Go template tags are only processes in go templates, not in content files.

Best practice is generally to separate content and presentation. Website editors should not need to know coding.

To get the functionality you are after I would take a look at shorcodes, a very handy Hugo feature.


Ok, thanks

So If I want to have an “about” page with some dynamic content, let’s say a list of team members coming from some data/team.yml. What template file should I create?


title = 'About'
date = 2022-10-08T10:07:45-07:00
draft = false
layout = 'about'

Then create your template at layouts/page/about.html.

1 Like


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.