Statac

Problems explained

Nested setting

error An error stops the build: nothing is published until it is fixed.

One of Statac’s settings is written nested under its first part, such as layout: indented under pages:, or a text on a card is written as title: with text: beneath it. Statac’s own settings have one spelling, written flat on one line: pages.layout: post, title.text:.

What you’ll see

error  Nested setting: `layout` under `pages`
  Write it flat: `pages.layout: post`.
  More: https://statac.dev/e/nested-setting/

In the terminal the message also names the file and line where there is one, and marks the exact text.

Why Statac stops

Your own fields may nest, and reach templates the same way. Statac’s settings keep the one flat spelling, so every site writes them alike and anyone reading a site’s files learns them once.

How to fix it

Write the setting on one line, as the message shows.

Example

In content/notes/index.md:

---
title: Notes
pages:
  layout: note
---

Written flat:

---
title: Notes
pages.layout: note
---

Its name

Namenested-setting
In the terminalstatac explain nested-setting
To stop showing itIt stops the build, so it can't be quietened.

Something unclear or wrong? Open an issue on GitHub.