Statac

Problems explained

Data named twice

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

Two things in data/ would reach templates by one name: two files with the same name and different endings, such as people.yaml and people.json, or a file and a folder, such as people.yaml and people/.

What you’ll see

error  Data named twice: `data/people.json` and `data/people.yaml` are both `site.data.people`
  Rename one of them.
  More: https://statac.dev/e/data-named-twice/

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

Why Statac stops

Templates reach data/people.yaml as site.data.people, and a folder data/people/ by the same name. With two at one name, Statac can’t tell which you meant, and taking either would quietly hide the other.

How to fix it

Rename one of them, or remove the one you no longer use.

Example

data/ holds:

data/people.yaml
data/people.json

Keep one, or give the other a name of its own:

data/people.yaml
data/people-old.json

Its name

Namedata-named-twice
In the terminalstatac explain data-named-twice
To stop showing itIt stops the build, so it can't be quietened.

Something unclear or wrong? Open an issue on GitHub.