RSSFranklin aims to support automatic & easy RSS feed generation.
RSS (commonly referred to as Really Simple Syndication) is a standard web format that allows interested readers to subscribe to feeds and read new content on a platform of their choosing, i.e., without browsing to the website from which the content originated. Franklin makes it easy to generate this feed so that readers can more easily stay up to date with your new content.
How to Setup RSS
There is a Franklin-generated
_rss folder that contains two parts:
item.xml (if this is not present for you, then copy the files from the FranklinTemplates source.
The complete RSS feed will be built by assembling
head item item item (foot)
foot.xmlis not exposed by default because there is nothing to customize there. Both
item.xmlcontain sane defaults based on good standards. However, their contents may be modified.
In order to set up an RSS feed for your website, make sure to set the following in your
generate_rss = true rss_website_title = "Website Title" rss_website_descr = "Website Description" rss_website_url = "https://<your username>.github.io" rss_full_content = true
rss_full_content = true. This line is important if you wish for your RSS feed to include the full content of your posts. If
rss_full_content = false, then subscribers will be notified of new content, but must visit your site in order to read it.
For each page that you wish to be included in your RSS feed, you should specify the description of the page. This can be done with the
rss_description or equivalently the
rss_descr local page variable.
@def rss_description = "The page synopsis."
Each page should include a publication date - specified by
rss_pubdate and in the format of
Dates.Date. For example:
@def rss_pubdate = Date(2021, 12, 31)
Each page should also include a title. If one is not specified then the page
title will be used instead. To explicitly set the
rss_title, do the following:
@def rss_title = "Item Title"
Optionally, the following page variables can be set as well
rss_authorvariable must be an email address. So unless you are familiar it is advised to leave these out.
RSS Page Variables
Here is a summary of all page variables related to RSS.
Global RSS Variables
|indicates whether |
|Used as website title in the RSS feed|
|Used as website description in the RSS feed|
truethen the three other variables must be defined.
falsebut the three
website_*variables are defined,
generate_rsswill be switched to
Local RSS Variables
These are variables related to RSS 2.0 specifications and must match the format indicated there.
|current page title|
To recapitulate, for a working RSS feed to be generated you need:
to set the
website_*variables in your
config.md(see global configuration),
on appropriate pages, to define at least
rssto a valid description.