rss: {
enabled: true,
feeds: [
{
filename: 'blog.xml',
title: 'My blog',
description: 'New posts from my blog',
contentPatterns: ['**/blog/**/*.md'],
excludePatterns: ['**/index.md'],
maxItems: 20,
},
],
},
- The patterns are matched against each Markdown file's full path on disk, like
/home/me/my-site/site/blog/post.md, so a folder pattern needs**/in front.'blog/**'matches nothing and the feed comes out empty. **/blog/**/*.mdalso matches the listing,blog/index.md, hence theexcludePatterns.- The items take their title, description, publish date and tags (as categories) from the front matter, newest first.
- Feeds come from
stati buildonly, never from the dev server.
Stati doesn't advertise the feed. Add the link to the layout's <head>:
<link rel="alternate" type="application/rss+xml" title="My blog" href="/blog.xml">
One gotcha in itemMapping: includeContent: true puts the post's Markdown source in the item, not its HTML, and most feed readers show that as plain text.
In the Stati docs: Filter by directory, RSS feed is empty and Include full content.