Create a RSS feed

You can create a page which will be used as a RSS feed for your blog. In the list of pages, it is tagged with the "RSS" label.


  • an "articles" page was created as well as a templatized page for an article.
  • an "article" model was also created.

In order to create that kind of page, follow these steps:

1. click on the "new page" button.

2. select "RSS" as the response type in the "Advanced options".

3. fill the template with the code below.

Rss code:

<rss version="2.0"
    <title>{{ site.seo_title }}</title>
    <description>{{ site.meta_description }}</description>
    <atom:link href="" rel="self" type="application/rss+xml" />
    {% for article in contents.articles %}
        <title>{{ article.title }}</title>
        <description>{{ article.excerpt }}</description>
        <content:encoded>{{ article.body }}></content:encoded>
        <link>{{ article._permalink }}</link>
        <guid isPermaLink="true">{{ article._permalink }}</guid>
        <pubDate>{{ article.posted_at | localized_date: '%a, %d %b %Y %H:%M:%S %z' }}</pubDate>
        <source url=""></source>
    {% endfor %}

4. click on the "create" button at the bottom of the screen

Note: do not forget to set the "Published" flag to true.

If you want the browsers and news readers to auto-detect your RSS feed, add the following statement within the "head" tag of your template.

{{ '/articles/rss.xml' | auto_discovery_link_tag }}
© 2024 LocomotiveCMS Terms of use Privacy Policy
Back to top