about summary refs log tree commit diff homepage
path: root/_rss
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2021-05-25 15:28:14 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2021-05-25 15:28:14 +0700
commit715066eb931b0b74afb8746e0cf0d263ddedc7b3 (patch)
tree862674a1808d1df8d408660bf472f86e28fac578 /_rss
parent72050ff5ad13a2753ed4b3ed0e36d86f7b0ee919 (diff)
downloadsite-715066eb931b0b74afb8746e0cf0d263ddedc7b3.tar.gz
Bundle full content in RSS feed
Diffstat (limited to '_rss')
-rw-r--r--_rss/head.xml12
-rw-r--r--_rss/item.xml31
2 files changed, 13 insertions, 30 deletions
diff --git a/_rss/head.xml b/_rss/head.xml
index 4c9f62b..28f4204 100644
--- a/_rss/head.xml
+++ b/_rss/head.xml
@@ -20,17 +20,13 @@ rss_file variable in your config file if you want to use something different tha
   xmlns:georss="http://www.georss.org/georss">
 
   <channel>
-    <title>
-      <![CDATA[  {{fd2rss website_title}}  ]]>
-    </title>
-    <link> {{website_url}} </link>
-    <description>
-      <![CDATA[  {{fd2rss website_description}}  ]]>
-    </description>
+    <title><![CDATA[{{fd2rss website_title}}]]></title>
+    <link>{{website_url}}</link>
+    <description><![CDATA[{{fd2rss website_description}}]]></description>
     <atom:link
       href="{{fd_rss_feed_url}}"
       rel="self"
-      type="application/rss+xml" />
+      type="application/rss+xml"/>
 <!--
 * items will be added here in chronological order
 * the channel will then be closed
diff --git a/_rss/item.xml b/_rss/item.xml
index 07f6506..554a7fd 100644
--- a/_rss/item.xml
+++ b/_rss/item.xml
@@ -17,44 +17,31 @@ We use the conservative 'only one' approach by default but you could tweak this
 defining your own `rss_enclosures` variable with a list of string and use that.
 -->
 <item>
-  <title>
-    <![CDATA[  {{fd2rss rss_title}}  ]]>
-  </title>
-  <link> {{fd_full_url}} </link>
-  <guid> {{fd_full_url}} </guid>
+  <title><![CDATA[{{fd2rss rss_title}}]]></title>
+  <link>{{fd_full_url}}</link>
+  <guid>{{fd_full_url}}</guid>
   <description>
-    <![CDATA[  {{fd2rss rss_description}}  ]]>
+    <![CDATA[{{fd2rss rss_description}}]]>
   </description>
 
   <!-- note that fd_page_html is already HTML, so we don't use fd2rss here -->
   {{if rss_full_content}}
   <content:encoded>
-    <![CDATA[  {{fix_relative_links fd_page_html}} ]]>
+    <![CDATA[{{fix_relative_links fd_page_html}}]]>
   </content:encoded>
   {{end}}
 
   <!-- RFC1123 enforces a RSS-compliant date formatting -->
   <pubDate>{{RFC822 rss_pubdate}}</pubDate>
 
-  <!-- if given this must be an email, see specs -->
-  {{isnotempty rss_author}}
-  <author> {{rss_author}} </author>
-  {{end}}
+  {{isnotempty rss_author}}<author>{{rss_author}}</author>{{end}}
   {{isnotempty author}}
   <atom:author>
     <atom:name>{{author}}</atom:name>
   </atom:author>
   {{end}}
 
-  {{isnotempty rss_category}}
-  <category> {{rss_category}} </category>
-  {{end}}
-
-  {{isnotempty rss_comments}}
-  <comments> {{rss_comments}} </comments>
-  {{end}}
-
-  {{isnotempty rss_enclosure}}
-  <enclosure> {{rss_enclosure}} </enclosure>
-  {{end}}
+  {{isnotempty rss_category}}<category>{{rss_category}}</category>{{end}}
+  {{isnotempty rss_comments}}<comments>{{rss_comments}}</comments>{{end}}
+  {{isnotempty rss_enclosure}}<enclosure>{{rss_enclosure}}</enclosure>{{end}}
 </item>