Feed written twice
warning A warning says what Statac did instead, and the build goes on.
A list’s feed: line names the same feed twice. Either the same name is
in the list twice, or two names lead to the same URL, such as feed.xml and
/posts/feed.xml on the list page of content/posts/. The message points
at the second one, and shows where the first is written.
What you’ll see
warning Feed written twice: `feed.xml` and `/posts/feed.xml` are both at `/posts/feed.xml`
Statac publishes the feed once; take one of them out of the `feed:` line.
More: https://statac.dev/e/feed-written-twice/
In the terminal, the message also shows the file and line, if there is one, and marks the exact text.
Why Statac warns
Only one file can be published at a URL. Both names ask for the same feed, so Statac publishes it once, built with the template the first name chooses, and warns you because you may have meant the second name to be a feed of its own. A name ends up at the same URL as another when one is written beside the list page and the other from the top of the site, or when they differ only in capitals, which most disks ignore.
How to fix it
Take one of the names out of the feed: line. If you meant two feeds,
such as an Atom feed and an RSS feed, give the second a name of its own,
such as rss.xml.
Example
In content/posts/index.md:
---
title: Posts
feed: [feed.xml, rss.xml, feed.xml]
---
With each feed named once:
---
title: Posts
feed: [feed.xml, rss.xml]
---
Its name
| Name | feed-written-twice |
|---|---|
| In the terminal | statac explain feed-written-twice |
| To stop showing it | quiet: [feed-written-twice] in statac.yaml, once you have understood it. Statac still counts it. |
Something unclear or wrong? Open an issue.