Already a site
error An error stops the build: nothing is published until it is fixed.
statac new, or statac import for the new site, was given a folder
that is a site already: it has a
statac.yaml, the site’s settings, or a content/ folder, the site’s
writing.
What you’ll see
error Already a site: `site-1` has a `statac.yaml`
To bring its starter files up to date, run `statac new --update`.
More: https://statac.dev/e/already-a-site/
In the terminal the message also names the file and line where there is one, and marks the exact text.
Why Statac stops
Writing a new site’s files over a site’s own would change how its pages
look and what it says. statac new only ever writes into an empty
folder, or a new one.
How to fix it
To build the site that is there, run statac build or statac serve in
its folder. To bring its starter files up to date, the templates,
snippets and stylesheet statac new wrote, run statac new --update
there. To start another site, give statac new the name of a new
folder.
Example
statac new site-1
where site-1 has a statac.yaml. To start another site beside it:
statac new site-2
Its name
| Name | already-a-site |
|---|---|
| In the terminal | statac explain already-a-site |
| To stop showing it | It stops the build, so it can't be quietened. |
Something unclear or wrong? Open an issue on GitHub.