RSS and Atom feeds
Publish syndication feeds from pages with register: feed.rss or feed.atom.
RSS and Atom feeds
lazysite includes starter registry templates for RSS and Atom feeds.
Pages opt in to feeds by listing feed.rss or feed.atom in their
register: front matter.
Syntax
---
title: Blog Post Title
subtitle: A brief description of the post.
date: 2024-06-15
register:
- feed.rss
- feed.atom
---
Feed templates
The starter includes two feed templates in registries/:
feed.rss.tt- generatesfeed.rss(RSS 2.0)feed.atom.tt- generatesfeed.atom(Atom 1.0)
Both templates use these page fields:
page.title- entry titlepage.url- entry link (combined withsite_url)page.subtitle- entry description/summary (optional)page.date- publication date
And these site variables from lazysite.conf:
site_name- feed titlesite_url- base URL for absolute links
Example
Add date: to front matter for meaningful feed ordering:
---
title: Version 2.0 Released
subtitle: Major update with new features.
date: 2024-06-15
register:
- feed.rss
- feed.atom
- sitemap.xml
---
Notes
- The
date:front matter field is important for feeds - without it, the file mtime is used, which may not reflect the publication date - Feed templates must be copied to
lazysite/templates/registries/during installation - they are not included automatically - Feeds regenerate on the registry TTL schedule (4 hours by default)
- Delete
feed.rssorfeed.atomfrom the docroot to force regeneration on next page request - Registries - how the registry system works