From f2f2eeb7c21e6a0be1854be83f07a4ee5b916d45 Mon Sep 17 00:00:00 2001 From: davegson <3080765+davegson@users.noreply.github.com> Date: Wed, 26 May 2021 15:00:42 +0200 Subject: [PATCH 1/3] Bring our RSS feed to a workable state Correctly utilize <content:encoded> and <description> tags according to: https://stackoverflow.com/a/54905457 https://www.rssboard.org/rss-profile#namespace-elements-content-encoded If there is a summary, show it in <description> with the content being in <content:encoded>. If there is NO summary, put the content in <description>. Also, I added a custom "summary"/disclaimer for progress update blogs to clarify that the HTML of update blogs really is not compatible with readers but should be viewed in the Webview. --- feed.xml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/feed.xml b/feed.xml index dd82f35..93d2a4f 100644 --- a/feed.xml +++ b/feed.xml @@ -2,7 +2,7 @@ layout: null --- <?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" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="'http://purl.org/rss/1.0/modules/content/"> <channel> <title>{{ site.title | xml_escape }}</title> <description>{{ site.description | xml_escape }}</description> @@ -15,13 +15,26 @@ layout: null {% for post in sorted_blogs %} <item> <title>{{ post.title | xml_escape }}</title> - <description>{{ post.content | xml_escape }}</description> + {% if post.progress_update %} + <description>Progress Updates Are Only Compatible in Webview (due to CSS tricks for NoJS support)</description> + <content:encoded> + {{ post.content | markdownify | xml_escape }} + </content:encoded> + {% elsif post.summary %} + <description>{{ post.summary | markdownify | xml_escape }}</description> + <content:encoded> + {{ post.content | markdownify | xml_escape }} + </content:encoded> + {% else %} + <description>{{ post.content | xml_escape }}</description> + {% endif %} <pubDate>{{ post.date | date_to_rfc822 }}</pubDate> <link>{{ site.url }}{{ site.base_url }}{{ post.url | replace_first: '/', '' }}</link> <guid isPermaLink="true">{{ site.url }}{{ site.base_url }}{{ post.url | replace_first: '/', '' }}</guid> {% for tag in post.tags %} <category>{{ tag | xml_escape }}</category> {% endfor %} + <dc:creator>{{ post.author | xml_escape }}</dc:creator> </item> {% endfor %} </channel> From de490305ba4fbcd56a58340c5950a94a86b4633b Mon Sep 17 00:00:00 2001 From: davegson <3080765+davegson@users.noreply.github.com> Date: Wed, 26 May 2021 15:08:17 +0200 Subject: [PATCH 2/3] Include future publications for easier local testing --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1f89b56..a828876 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ # docker-compose up jekyll: image: jekyll/jekyll - command: jekyll serve --watch --incremental --livereload + command: jekyll serve --watch --incremental --livereload --future ports: - 4000:4000 - 35729:35729 From 3b95d1b66e434cc487754bcd54a35197b9185694 Mon Sep 17 00:00:00 2001 From: davegson <3080765+davegson@users.noreply.github.com> Date: Wed, 26 May 2021 15:16:11 +0200 Subject: [PATCH 3/3] Move feed.xml to blog.xml --- _config.yml | 1 + feed.xml => blog.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) rename feed.xml => blog.xml (93%) diff --git a/_config.yml b/_config.yml index d11bd2a..d54a0a2 100644 --- a/_config.yml +++ b/_config.yml @@ -19,6 +19,7 @@ vendor_url: /vendor/ ### pages about_url: /about/ +blog_feed_url: /blog.xml blog_url: /blog/ backlog_url: /backlog/ community_hub_url: /community-hub/ diff --git a/feed.xml b/blog.xml similarity index 93% rename from feed.xml rename to blog.xml index 93d2a4f..231f0fa 100644 --- a/feed.xml +++ b/blog.xml @@ -7,7 +7,7 @@ layout: null <title>{{ site.title | xml_escape }}</title> <description>{{ site.description | xml_escape }}</description> <link>{{ site.url }}{{ site.base_url }}</link> - <atom:link href="{{ site.url }}{{ site.base_url }}feed.xml" rel="self" type="application/rss+xml"/> + <atom:link href="{{ site.url }}{{ site.base_url }}{{ site.blog_feed_url }}" rel="self" type="application/rss+xml"/> <pubDate>{{ site.time | date_to_rfc822 }}</pubDate> <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate> <generator>Jekyll v{{ jekyll.version }}</generator>