Hugo default front matter fields vs params

Hugo is now encouraging users to set custom parameters under Params key. Before, you could do this

---
title: I shot the Sheriff
date: 2021-07-11
weight: 10
author: Jane Doe
featured: true
---

But now you have to do this

---
title: I shot the Sheriff
date: 2021-07-11
weight: 10
params:
  author: Jane Doe
  featured: true
---

So, it is better for users to get into the habit of using the new format even though the former is still supported. Read more below

4 Likes

I use .Params.X now, and I find my markdown a bit more portable. It is worth the seven extra characters IMO.

It shouldn’t be. The link I shared shows the default keys used by Hugo. The rest you define under the Params key.

1 Like