Files
simplex-chat/website/src/blogs-rss-feed.njk
T
M Sarmad Qadeer 9fa93e40cb website: add atom feeds for blogs (#2233)
* website: add atom feeds for blogs

* update front-matter

* website: add atom and rss feeds for blogs

* include full blog content

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-04-24 19:31:59 +01:00

35 lines
1.6 KiB
Plaintext

---
permalink: feed.rss
eleventyExcludeFromCollections: true
metadata:
title: SimpleX Chat Blog
subtitle: It allows you to stay up to date with the latest Blogs from SimpleX Chat.
language: en
url: https://simplex.chat/,
author:
name: SimpleX Chat
email: chat@simplex.chat
---
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:base="{{ metadata.url }}" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ metadata.title }}</title>
<link>{{ metadata.url }}</link>
<atom:link href="{{ permalink | absoluteUrl(metadata.url) }}" rel="self" type="application/rss+xml"/>
<description>{{ metadata.subtitle }}</description>
<language>{{ metadata.language }}</language>
{%- for blog in collections.blogs %}
{%- set absolutePostUrl = blog.url | absoluteUrl(metadata.url) %}
<item>
<title>{{ blog.data.title }}</title>
<link>{{ absolutePostUrl }}</link>
<description>{{ blog.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</description>
{# <description>{{ blog.templateContent | striptags | truncate(200) }}</description> #}
{# <pubDate>{{ blog.data.date | dateToRfc822 }}</pubDate> #}
<pubDate>{{ blog.data.date.toUTCString().split(' ').slice(1, 4).join(' ') }}</pubDate>
<dc:creator>{{ metadata.author.name }}</dc:creator>
<guid>{{ absolutePostUrl }}</guid>
</item>
{%- endfor %}
</channel>
</rss>