Hugo

What does metaDataFormat do?

Seaching for metaDataFormat offers many half discussions, but I’m just looking for a basic description. I thought archetype formats are copied over, but it appears this changes that and I’ve never noticed… enlighten me! :slight_smile:

It does … nothing.

It used to do something.

At one point, when you did hugo new page.md, we used metaDataFormat to decide what format we would use for the front matter of the new page.

But then, at some point, I rewrote the rather complex page parsing logic – and removed this particular feature as part of that simplication …

We now treat the archetype templates as template files and do nothing further magic mumbo jumbo with them.

2 Likes

Thanks @bep! Removed from config doc (https://github.com/gohugoio/hugoDocs/pull/908).

Hey docs folks, there’s still a reference at https://gohugo.io/templates/introduction/#hugo-parameters I’m not sure how to reword; maybe just list yaml, toml, and json?

Hugo provides the option of passing values to your template layer through your site configuration (i.e. for site-wide values) or through the metadata of each specific piece of content (i.e. the front matter). You can define any values of any type and use them however you want in your templates, as long as the values are supported by the front matter format specified via metaDataFormat in your configuration file.