Duplicate key
error An error stops the build: nothing is published until it is fixed.
The same key is written twice at one level of some YAML or JSON: twice in a page’s front matter, twice under the same key in a settings or data file, or twice in one object of a JSON file. The message points at the second, and shows where the first was written.
What you’ll see
error Duplicate key: `title`
More: https://statac.dev/e/duplicate-key/
In the terminal the message also names the file and line where there is one, and marks the exact text.
Why Statac stops
YAML doesn’t allow a key twice, JSON leaves it to each reader, and Statac can’t know which of the two values you meant. Taking either one would quietly drop the other.
How to fix it
Keep the value you want and remove the other line.
Example
In content/post-1.md:
---
title: Post 1
date: 2026-10-04
title: Post 2
---
Keep one title:
---
title: Post 1
date: 2026-10-04
---
Its name
| Name | duplicate-key |
|---|---|
| In the terminal | statac explain duplicate-key |
| To stop showing it | It stops the build, so it can't be quietened. |
Something unclear or wrong? Open an issue on GitHub.