How do you order your front matter?


#1

Open ended question. How do you order your front matter in content files? Alphabetically, by grouping related fields together etc? Do yo use the same process across your content or adapt it towards the content?


#2

Most of my blog posts are using the default front matter from my archetype https://github.com/zwbetz-gh/cupper-hugo-theme/blob/master/archetypes/default.md

Then when I add more front matter (aliases, etc) I just add those to the bottom.


#3

Hi!

I have been using this format for a long time:

(draft: true)
(layout: )

[slug: ]
[date: ]
title: 
subtitle: 

All other statements are sorted alphabetically by key.

() means optional.

[] indicate that I do not use them in front matter. These statements are derived from file names.

But ordering a) technically does not matter (TOML has some exceptions, I think) and b) totally depends on the project.