Title missing from archetype

Is there a way to prevent Hugo from complaining about the title: missing on the archetype, that doesn’t involved adding it, that is? Using Hugo on a microblog, and titles aren’t needed.

If memory serves me right title is mandatory. I think that this has been discussed before.

None of the front matter is mandatory. I remember trying just


and it just worked.

1 Like

@alexandros I searched and could not find a relevant discussion, would you mind pointing it out? Mandatory would mean it will not run/work without it. It does, so it isn’t.

@kaushalmodi my theme works, but Hugo will complain. Is there a way to make it ignore the lack of of on the frontmatter?

It’s impossible to comment without looking at your site source.

@kaushalmodi, the frontmatter I am using:

date: "{{ .Date }}"
url: "{{ now.Unix }}"

That’s the pertinent source. When creating a new entry, it spits out:

WARNING: date and/or title missing from archetype file "/example.com/archetypes/default.md".
From Hugo 0.24 this must be provided in the archetype file itself, if needed. Example:
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
draft: true

Hmm, it seems that I can mute the complaining but simply adding an empty title: "". That will work for what I need.

It was around Hugo 0.24 Sorry can’t search right now.

The console message is pretty clear though. And it’s a Warning under hugo verbose not an Error. So it’s not a big deal. The site will be generated as is.