Frontmatter not starting as toml

#1

hugo new site PATH --format toml creates YAML front matter in archetypes/default.md. (I’d rather not open a bug, so here we are.)

This happens with or without double quotes around toml, as is probably to be expected.

Anyway, the expected behavior is to have TOML front matter, though it always seems to start as:

---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

And according to the docs, TOML is identified by three + symbols (+++).

0 Likes

#2

Welcome to the forums @zeptoSteve. What version of hugo are you using?

0 Likes

#3

The reasoning for this I suppose is expressed at https://github.com/gohugoio/hugo/issues/5241#issuecomment-423469803.

I think we need to fix the docs (https://gohugo.io/commands/hugo_new_site/):

  -f, --format string   config & frontmatter format (default "toml")

That’s not true. :slight_smile:

1 Like

#4

0.55.1, installed via Homebrew.

With regard to the reasoning, I don’t use GitHub for anything. I’ll be using this with GitLab. I do understand most people are the other way around, though. Just stating the obvious of “not everybody uses GitHub”.

1 Like