Skip to content

Commit bac1bf0

Browse files
authored
Merge pull request #95 from jbampton/add-jekyll-rss
Add Jekyll RSS
2 parents 5151d65 + d136dea commit bac1bf0

File tree

6 files changed

+42
-3
lines changed

6 files changed

+42
-3
lines changed

Gemfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ source 'https://rubygems.org'
33
gem 'github-pages', group: :jekyll_plugins
44

55
group :jekyll_plugins do
6+
gem 'jekyll-feed'
67
gem 'jekyll-sitemap'
78
end
89

9-
group :scripts do
10-
gem 'mgem'
11-
gem 'git'
10+
group :scripts do
11+
gem 'mgem'
12+
gem 'git'
1213

1314
# API Docs
1415
gem 'yard-mruby'

Gemfile.lock

+1
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ PLATFORMS
275275
DEPENDENCIES
276276
git
277277
github-pages
278+
jekyll-feed
278279
jekyll-sitemap
279280
mgem
280281
yard-coderay

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ url: https://mruby.org
1212
repository: https://github.com/mruby/mruby.github.io
1313
include: _index.html
1414
plugins:
15+
- jekyll-feed
1516
- jekyll-sitemap
1617
exclude:
1718
- CODEOWNERS

_includes/footer.html

+5
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
<div class="container">
33
<a href="https://github.com/h2so5/mruby-logo">mruby-logo</a> provided by <a href="https://github.com/h2so5">h2so5</a>
44
</div>
5+
<div>
6+
<a href="/rss.xml">
7+
<img src="/images/icons/rss-feed.png" alt="RSS feed" title="RSS feed" width="25" height="25">
8+
</a>
9+
</div>
510
</footer>

images/icons/rss-feed.png

1.11 KB
Loading

rss.xml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: null
3+
---
4+
<?xml version="1.0" encoding="UTF-8"?>
5+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
6+
<channel>
7+
<title>{{ site.title | xml_escape }}</title>
8+
<description>{{ site.description | xml_escape }}</description>
9+
<link>{{ site.url }}{{ site.baseurl }}/</link>
10+
<atom:link href="{{ "/rss.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
11+
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
12+
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
13+
<generator>Jekyll v{{ jekyll.version }}</generator>
14+
{% for post in site.posts %}
15+
<item>
16+
<title>{{ post.title | xml_escape }}</title>
17+
<author></author>
18+
<description>{{ post.content | xml_escape }}</description>
19+
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
20+
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
21+
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
22+
{% for tag in post.tags %}
23+
<category>{{ tag | xml_escape }}</category>
24+
{% endfor %}
25+
{% for cat in post.categories %}
26+
<category>{{ cat | xml_escape }}</category>
27+
{% endfor %}
28+
</item>
29+
{% endfor %}
30+
</channel>
31+
</rss>

0 commit comments

Comments
 (0)