Why front matter is always in yaml (I have metaDataFormat = "toml")?

Hi,
I’m starting to play with hugo and I have set metaDataFormat = "toml", but everytime a create a new content I have always yaml front matter.

How is it possible to have it in toml?
I’m using v0.32 and beautifulhugo theme.

Thank you

You can replace the “—” with “+++” as the front matter delimiter.

I think the reason YAML is most common is

  1. It is what you see in most examples
  2. GitHub parses it into a nice table
1 Like

Thank you.

But if I set metaDataFormat = "toml" I should have front matter in toml when I create a new content. Or Am I wrong??

1 Like

Yes, that will work with the hugo new some/page.md.

1 Like

My problem is that I have alwasy in yaml, and I have set metaDataFormat = "toml"

@bep thank you again.

I have an empty site. I have anything to convert.

I’m creating my first page and I have front matter in yaml and not in toml. Why?
I have set metaDataFormat = "toml".

My config.toml

baseURL = "http://example.org/"
metaDataFormat = "toml"
languageCode = "en-us"
title = "A test"
theme="beautifulhugo"
publishDir = "public"
config = "config.toml"

@bep is it normal for an empy site with metaDataFormat = "toml" to have alwasy new content frontmatter in yaml?

What’s the meaning of metaDataFormat option?

Thank you

Why do you ask me about this?

Because you were kind and already answered me in this thread, and I’m not able to create new content using by default toml frontmatter.
If I run hugo new page.md in a empty hugo site configured with metaDataFormat = “toml”`, I have always yaml front matter.
It’s seems to me a wrong behavior and I do not understand what I’m wrong.

Thank you

How have you set the archetype? You will have to set the site source for someone to help you.

Ok, I understood I must set archetype. Than a stupid question: once I have set metaDataFormat = "toml", what are the consequences for a hugo site?
It’s not to have front matter in toml, because this depend on archetype files (if these are in yaml, you will have front matter in yaml). Am I right?

Thank you

Honestly, I use neither archetypes, nor that config variable. I simply have front-matter with +++ to have it interpreted as TOML, as simple as that.

@aborruso
Just for reference: it appears to not be in use anymore (since a while already).
PR to fix this: https://github.com/gohugoio/hugoDocs/pull/554