update RSS and add atom feed

This commit is contained in:
sakrecoer 2020-11-17 01:23:25 +01:00
parent 4b5ba368e7
commit 8981ba538b
5 changed files with 61 additions and 30 deletions

View file

@ -5,4 +5,5 @@ gem 'jekyll', '4.1.1'
group :jekyll_plugins do
gem 'jekyll-sitemap', '1.4.0'
gem 'jekyll-last-modified-at','1.1.0'
gem 'jekyll-image-size'
end

View file

@ -5,10 +5,11 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.7)
em-websocket (0.5.1)
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
fastimage (2.2.0)
ffi (1.13.1)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
@ -29,6 +30,9 @@ GEM
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 1.8)
jekyll-image-size (1.2.1)
fastimage (>= 1.8)
jekyll (>= 3.7)
jekyll-last-modified-at (1.1.0)
jekyll (>= 3.7, < 5.0)
posix-spawn (~> 0.3.9)
@ -43,7 +47,7 @@ GEM
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.2.1)
listen (3.3.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
@ -55,7 +59,7 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.4)
rouge (3.23.0)
rouge (3.25.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
@ -68,6 +72,7 @@ PLATFORMS
DEPENDENCIES
jekyll (= 4.1.1)
jekyll-image-size
jekyll-last-modified-at (= 1.1.0)
jekyll-sitemap (= 1.4.0)

View file

@ -161,8 +161,9 @@ _explore:
# plugins:
plugins:
# - jekyll-pwa-plugin
- jekyll-image-size
# pwa:
# enabled: false # Optional

38
atom.xml Normal file
View file

@ -0,0 +1,38 @@
---
layout: nil
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="text" xml:lang="en">{{ site.title }}</title>
<subtitle>{{ site.description | xml_escape }}</subtitle>
<link type="application/atom+xml" href="{{ site.url }}/atom.xml" rel="self"/>
<link type="text/html" href="{{ site.url }}/" rel="alternate"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.url }}/atom.xml</id>
<author>
<name>{{ site.publisher.name }}</name>
<email>{{ site.publisher.mail }}</email>
</author>
<rights>Copyleft {{ site.time | date: '%Y' }} {{ site.publisher.name }}</rights>
<icon>{{ site.url }}{{ site.icon }}</icon>
<logo>{{ site.url }}{{ site.icon }}</logo>
{% for post in site.posts limit:10 %}
<entry>
<title>{{ post.title }}</title>
<link href="{{ site.url }}{{ post.url }}"/>
<published>{{ post.date | date_to_xmlschema }}</published>
<updated>{{ post.last_modified_at | date_to_xmlschema }}</updated>
<id>{{ site.url }}{{ post.url }}</id>
<content type="html">{{ post.content | strip_html | truncate: 220 | xml_escape }}</content>
<summary>{{ post.description }}</summary>
<author>
{% assign author_id = post.author | prepend: "/authors/" | append: "/" %}
{% assign author = site.authors | where: "url", author_id | first %}
<name>{{ author.name }}</name>
<email>{{ author.email }}</email>
<uri>{{ author.url_staff }}</uri>
</author>
</entry>
{% endfor %}
</feed>

View file

@ -2,54 +2,40 @@
layout: nil
title : To Setto Setto RSS Feed
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" >
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>{{ site.title | xml_escape }}</title>
<atom:link href="{{ site.url }}/feed.xml" rel="self" type="application/rss+xml" />
<atom:link href="{{ site.url }}/atom.xml" rel="self" type="application/rss+xml" />
<link>{{ site.url }}</link>
<description>{{ site.description | xml_escape }}</description>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<language>en-US</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://jekyllrb.com/</generator>
<image>
<url>{{ site.url }}/siteicon.png</url>
<title>{{ site.title | xml_escape }}</title>
<link>{{ site.url }}</link>
</image>
<itunes:summary><![CDATA[{{ site.description | xml_escape }}]]></itunes:summary>
<itunes:author>{{ site.social.mail }}</itunes:author>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="{{ site.url }}{{ site.banner }}" />
<itunes:owner>
<itunes:name>{{ site.publisher.name | xml_escape }}</itunes:name>
<itunes:email>{{ site.publisher.mail }}</itunes:email>
</itunes:owner>
<managingEditor>{{ site.publisher.mail }} ({{ site.publisher.name }})</managingEditor>
<copyright>Anti-Copyright 2018 {{ site.title }}</copyright>
<itunes:subtitle>{{ site.title }}</itunes:subtitle>
<itunes:category text="Music">
</itunes:category>
{% for post in site.posts limit: 7 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<link>{{ site.url }}{{ post.url }}?pk_campaign=RSS</link>
<link>{{ site.url }}{{ post.url }}?pk_campaign=rss</link>
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
<description>{{ post.description | truncate: 200 | xml_escape }}</description>
<category>Hi-Lights</category>
<author>{{ site.social.mail | xml_escape }} ({{ site.social.name }})</author>
{% assign author_id = post.author | prepend: "/authors/" | append: "/" %}
{% assign author = site.authors | where: "url", author_id | first %}
<dc:creator>{{ author.name }}</dc:creator>
<author>{{ author.email }} ({{ author.name }})</author>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<itunes:author>{{ site.publisher.mail }}</itunes:author>
<itunes:explicit>No</itunes:explicit>
<itunes:subtitle>{{ post.description | truncate: 200 | xml_escape }}</itunes:subtitle>
<itunes:summary>{{ post.description | xml_escape }}</itunes:summary>
<itunes:keywords>{% for tags in post.tags %}{{ tags | xml_escape | strip_html }}{% unless forloop.last %}, {% endunless %}{% endfor %}</itunes:keywords>
<itunes:image href="{{ site.url }}{{ post.image }}"/>
<media:thumbnail url="{{ site.url }}{{ post.image }}" {% imagesize {{ post.image }}:props %}></media:thumbnail>
<media:title type="pl ain">{{ post.title | xml_escape }}</media:title>
</item>
{% endfor %}
</channel>