Skip to content

006: RSS feed creation

Status

Accepted

Context

We want the readers to be notified by RSS of the changes of the documentation site. They should be able to choose the frequency of the updates.

Proposals

Once the newsletter mkdocs articles are created, we need to expose them through RSS feeds for each of the periodicities (daily, weekly, monthly and yearly).

We have the newsletter articles both in markdown and in html if we use the on_post_build event.

We need to create both the RSS site documentation and the entries content. The first one can be created with the contents of the mkdocs config object, the second ones using the html might be more interesting as it will have already the internal links resolved to working urls.

We'll refactor the code from mkdocs-rss-plugin, as they've already solved the problem of creating an RSS for a MkDocs site.

We need to decide:

Newsletter selection

We're going to expose 15 entries in each feed.

To get the 15 last newsletters for each feed we need to analyze the existent elements in the newsletter directory and then see the latest modification date of each of them.

The published_date of the channel must be the published date of the last entry of the feed.

How to create each feed

We'll use the mkdocs-rss-plugin jinja2 template. I tried to use feedparser, but it's only for parsing and not for building RSSs.

Decision

Implement the only proposal.

Consequences