Statac

Problems explained

Names nothing

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

A field that statac.yaml declares as one of data. and a table, or one of folder. and a folder, holds a value that is none of the names there. A table’s names are the names its items are written under. A folder’s names are its pages’ names as they stand in their addresses: book-1 for book-1.md, and day-one for 03-day-one.md in a numbered folder.

What you’ll see

error  Names nothing: `data/people.yaml` has no `persn-1`
  Did you mean `person-1`?
  More: https://statac.dev/e/names-nothing/

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

Why Statac stops

The rule is yours: you said the field names one of these. A name that matches none is most often a slip, and Statac can’t tell which record or page you meant. When a name is close, Statac offers it.

How to fix it

Write one of the names the table or the folder has, or add the record or the page the value names. A draft, and a post waiting for its day, can be named.

Example

In statac.yaml:

fields.author: one of data.people

In data/people.yaml:

person-1:
  name: Person 1
person-2:
  name: Person 2

In content/post-1.md:

---
title: Post 1
author: persn-1
---

The table’s name is person-1:

---
title: Post 1
author: person-1
---

Its name

Namenames-nothing
In the terminalstatac explain names-nothing
To stop showing itIt stops the build, so it can't be quietened.

Something unclear or wrong? Open an issue on GitHub.