Generating Atom feeds from your Lektor site
Installation of lektor-atom
The plugin to install is lektor-atom, and is installed via the terminal:
lektor add plugin lektor-atom lektor build
This adds a reference to the myproject.lektorproject file with the plugin and installs the plugin into the lektor pipeline.
Configure a feed
However, notice that after building the site no feed is generated! This is because no feeds have been setup yet.
configs/atom.ini containing the following lines (full documentation)
[blog] name = My Blog feed source_path = /blog item_model = blog-post url_path = /blog/feed.xml
url_path to suit your preferences. Trying to build now would result in an error:
E blog/feed.xml (RuntimeError: To use absolute URLs you need to configure the URL in the project config.)
To resolve the build process myproject.lektorproject must be updated with two lines within the project section to indicate the site's live URL and an absolute URL style:
[project] name = My Project url_style = absolute url = https://myproject.com [packages] lektor-atom = 0.2
The site can then build and the resulting feed can be accesssed from https://myproject.com/blog/feed.xml.