Add banner images to RSS feed

This commit is contained in:
Emi Matchu 2024-09-20 17:44:52 -07:00
parent 02203c187f
commit e4b7ed22cb
2 changed files with 18 additions and 3 deletions

View file

@ -1,3 +1,3 @@
title: OpenNeo Blog title: OpenNeo Blog
url: https://blog.openneo.net/ url: https://blog.openneo.net
description: For Dress to Impress, and uhh maybe other things later! description: For Dress to Impress, and uhh maybe other things later!

View file

@ -1,22 +1,37 @@
--- ---
layout: null layout: null
--- ---
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
<title>{{ site.title }}</title> <title>{{ site.title }}</title>
<link>{{ site.url }}</link> <link>{{ site.url }}</link>
<atom:link href="{{ page.url | prepend: site.url }}" rel="self" type="application/rss+xml" /> <atom:link
href="{{ page.url | prepend: site.url }}"
rel="self"
type="application/rss+xml" />
<description>{{ site.description }}</description> <description>{{ site.description }}</description>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate> <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<language>en-us</language>
{% for post in site.posts %} {% for post in site.posts %}
<item> <item>
<title>{{ post.title }}</title> <title>{{ post.title }}</title>
<link> <link>
{{ post.url | prepend: site.url }} {{ post.url | prepend: site.url }}
</link> </link>
{% if post.author %}
<author>{{ post.author }}</author>
{% endif %}
<description> <description>
{% if post.banner %}
<![CDATA[
<img
src="{{ post.banner.url }}"
width="{{ post.banner.width }}"
height="{{ post.banner.height }}"
/>
]]>
{% endif %}
{{ post.content | escape }} {{ post.content | escape }}
</description> </description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate> <pubDate>{{ post.date | date_to_rfc822 }}</pubDate>