The documentation page for archetypes illustrates their usage with YAML, the minimal example being:
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---
but while not mentioned in the docs, in fact hugo will accept archetypes specified in JSON (probably TOML as well but I haven’t tested it). E.g. something like:
{
"title": "{{ replace .File.ContentBaseName '-' ' ' | title }}",
"date": "{{ .Date }}",
"draft": true
}
will work fine. It seems that when generating content with hugo new --kind archetype, hugo will simply propagate the archetype format it finds into the newly generated page’s front matter (if the archetype is in json, the front matter will be in json).
This should be primarily useful for people who want to manage their front matter with json tools.