Unused feed template
note A note is about the published page, not a mistake.
The site has a feed template, such as templates/feed.xml, but no list
asks for a feed, so the template builds nothing. A template is a feed
template if its name starts with feed., or if it is written as a feed,
such as templates/rss.xml opening with <rss.
What you’ll see
note Unused feed template: no list asks for a feed
Write `feed: true` in `statac.yaml` for `templates/feed.xml` to build the site's feed.
More: https://statac.dev/e/unused-feed-template/
In the terminal, the message also shows the file and line, if there is one, and marks the exact text.
Why Statac says so
No list has a feed unless a feed: line asks for one. If a site has a
feed template but nothing asks for a feed, you probably meant to write a
feed: line, and nothing else would show that the site publishes no
feed, so Statac tells you once.
How to fix it
For the site’s feed, write feed: true in statac.yaml. On a site in
several languages, this gives each language’s own list a feed. A
feed: line in the site’s list page, content/index.md, is used
instead of the setting.
For a folder’s feed, write feed: true in the front matter of its list
page, the index.md in the folder. To give every list page a feed,
cascade the line from statac.yaml with pages.feed: true.
The message names templates/feed.xml if the site has it. If the site
has only another feed template, such as templates/feed.json, the
message offers a line naming a feed that template builds, such as
feed: feed.json.
If you don’t want any feeds, remove the template, or quieten the note
with quiet: [unused-feed-template] in statac.yaml.
Example
A site with a feed template:
templates/
base.html
feed.xml
page.html
With this line in statac.yaml, the site’s own list has a feed at
/feed.xml, built with the template:
title: Site
url: https://example.org/
feed_key: 0b6d0c4e-2f7a-8d51-9a8e-3c1f5e7a9b20
feed: true
Its name
| Name | unused-feed-template |
|---|---|
| In the terminal | statac explain unused-feed-template |
| To stop showing it | quiet: [unused-feed-template] in statac.yaml, once you have understood it. Statac still counts it. |
Something unclear or wrong? Open an issue.