Skip to content

Commit d136dea

Browse files
committed
Add Jekyll RSS
- Use Jekyll Feed - Strip whitespace from the Gemfile - Add `rss.xml` in the web root
1 parent aca4ee3 commit d136dea

File tree

6 files changed

+81
-33
lines changed

6 files changed

+81
-33
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

+40-30
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (6.0.3.3)
4+
activesupport (6.0.3.5)
55
concurrent-ruby (~> 1.0, >= 1.0.2)
66
i18n (>= 0.7, < 2)
77
minitest (~> 5.1)
@@ -17,8 +17,8 @@ GEM
1717
colorator (1.1.0)
1818
commonmarker (0.17.13)
1919
ruby-enum (~> 0.5)
20-
concurrent-ruby (1.1.7)
21-
dnsruby (1.61.4)
20+
concurrent-ruby (1.1.8)
21+
dnsruby (1.61.5)
2222
simpleidn (~> 0.1)
2323
em-websocket (0.5.2)
2424
eventmachine (>= 0.12.9)
@@ -27,21 +27,24 @@ GEM
2727
ffi (>= 1.3.0)
2828
eventmachine (1.2.7)
2929
execjs (2.7.0)
30-
faraday (1.0.1)
30+
faraday (1.3.0)
31+
faraday-net_http (~> 1.0)
3132
multipart-post (>= 1.2, < 3)
32-
ffi (1.13.1)
33+
ruby2_keywords
34+
faraday-net_http (1.0.1)
35+
ffi (1.14.2)
3336
forwardable-extended (2.6.0)
3437
gemoji (3.0.1)
35-
git (1.7.0)
38+
git (1.8.1)
3639
rchardet (~> 1.8)
37-
github-pages (208)
38-
github-pages-health-check (= 1.16.1)
40+
github-pages (212)
41+
github-pages-health-check (= 1.17.0)
3942
jekyll (= 3.9.0)
4043
jekyll-avatar (= 0.7.0)
4144
jekyll-coffeescript (= 1.1.1)
4245
jekyll-commonmark-ghpages (= 0.1.6)
4346
jekyll-default-layout (= 0.1.4)
44-
jekyll-feed (= 0.15.0)
47+
jekyll-feed (= 0.15.1)
4548
jekyll-gist (= 1.5.0)
4649
jekyll-github-metadata (= 2.13.0)
4750
jekyll-mentions (= 1.6.0)
@@ -52,7 +55,7 @@ GEM
5255
jekyll-relative-links (= 0.6.1)
5356
jekyll-remote-theme (= 0.4.2)
5457
jekyll-sass-converter (= 1.5.2)
55-
jekyll-seo-tag (= 2.6.1)
58+
jekyll-seo-tag (= 2.7.1)
5659
jekyll-sitemap (= 1.4.0)
5760
jekyll-swiss (= 1.0.0)
5861
jekyll-theme-architect (= 0.1.1)
@@ -76,13 +79,13 @@ GEM
7679
mercenary (~> 0.3)
7780
minima (= 2.5.1)
7881
nokogiri (>= 1.10.4, < 2.0)
79-
rouge (= 3.23.0)
82+
rouge (= 3.26.0)
8083
terminal-table (~> 1.4)
81-
github-pages-health-check (1.16.1)
84+
github-pages-health-check (1.17.0)
8285
addressable (~> 2.3)
8386
dnsruby (~> 1.60)
8487
octokit (~> 4.0)
85-
public_suffix (~> 3.0)
88+
public_suffix (>= 2.0.2, < 5.0)
8689
typhoeus (~> 1.3)
8790
html-pipeline (2.14.0)
8891
activesupport (>= 2)
@@ -117,7 +120,7 @@ GEM
117120
rouge (>= 2.0, < 4.0)
118121
jekyll-default-layout (0.1.4)
119122
jekyll (~> 3.0)
120-
jekyll-feed (0.15.0)
123+
jekyll-feed (0.15.1)
121124
jekyll (>= 3.7, < 5.0)
122125
jekyll-gist (1.5.0)
123126
octokit (~> 4.2)
@@ -143,8 +146,8 @@ GEM
143146
rubyzip (>= 1.3.0, < 3.0)
144147
jekyll-sass-converter (1.5.2)
145148
sass (~> 3.4)
146-
jekyll-seo-tag (2.6.1)
147-
jekyll (>= 3.3, < 5.0)
149+
jekyll-seo-tag (2.7.1)
150+
jekyll (>= 3.8, < 5.0)
148151
jekyll-sitemap (1.4.0)
149152
jekyll (>= 3.7, < 5.0)
150153
jekyll-swiss (1.0.0)
@@ -201,34 +204,39 @@ GEM
201204
kramdown-parser-gfm (1.1.0)
202205
kramdown (~> 2.0)
203206
liquid (4.0.3)
204-
listen (3.2.1)
207+
listen (3.4.1)
205208
rb-fsevent (~> 0.10, >= 0.10.3)
206209
rb-inotify (~> 0.9, >= 0.9.10)
207210
mercenary (0.3.6)
208211
mgem (0.3.0)
209-
mini_portile2 (2.4.0)
212+
mini_portile2 (2.5.0)
210213
minima (2.5.1)
211214
jekyll (>= 3.5, < 5.0)
212215
jekyll-feed (~> 0.9)
213216
jekyll-seo-tag (~> 2.1)
214-
minitest (5.14.2)
217+
minitest (5.14.4)
215218
multipart-post (2.1.1)
216-
nokogiri (~> 1.11.0)
217-
mini_portile2 (~> 2.4.0)
218-
octokit (4.18.0)
219+
nokogiri (1.11.1)
220+
mini_portile2 (~> 2.5.0)
221+
racc (~> 1.4)
222+
nokogiri (1.11.1-x86_64-darwin)
223+
racc (~> 1.4)
224+
octokit (4.20.0)
219225
faraday (>= 0.9)
220226
sawyer (~> 0.8.0, >= 0.5.3)
221227
pathutil (0.16.2)
222228
forwardable-extended (~> 2.6)
223-
public_suffix (3.1.1)
229+
public_suffix (4.0.6)
230+
racc (1.5.2)
224231
rb-fsevent (0.10.4)
225232
rb-inotify (0.10.1)
226233
ffi (~> 1.0)
227234
rchardet (1.8.0)
228235
rexml (3.2.4)
229-
rouge (3.23.0)
230-
ruby-enum (0.8.0)
236+
rouge (3.26.0)
237+
ruby-enum (0.9.0)
231238
i18n
239+
ruby2_keywords (0.0.4)
232240
rubyzip (2.3.0)
233241
safe_yaml (1.0.5)
234242
sass (3.7.4)
@@ -239,37 +247,39 @@ GEM
239247
sawyer (0.8.2)
240248
addressable (>= 2.3.5)
241249
faraday (> 0.8, < 2.0)
242-
simpleidn (0.1.1)
250+
simpleidn (0.2.1)
243251
unf (~> 0.1.4)
244252
terminal-table (1.8.0)
245253
unicode-display_width (~> 1.1, >= 1.1.1)
246254
thread_safe (0.3.6)
247255
typhoeus (1.4.0)
248256
ethon (>= 0.9.0)
249-
tzinfo (1.2.7)
257+
tzinfo (1.2.9)
250258
thread_safe (~> 0.1)
251259
unf (0.1.4)
252260
unf_ext
253261
unf_ext (0.0.7.7)
254262
unicode-display_width (1.7.0)
255-
yard (0.9.25)
263+
yard (0.9.26)
256264
yard-coderay (0.1.0)
257265
coderay
258266
yard
259267
yard-mruby (0.3.0)
260268
yard (~> 0.9.0)
261-
zeitwerk (2.4.0)
269+
zeitwerk (2.4.2)
262270

263271
PLATFORMS
264272
ruby
273+
x86_64-darwin-19
265274

266275
DEPENDENCIES
267276
git
268277
github-pages
278+
jekyll-feed
269279
jekyll-sitemap
270280
mgem
271281
yard-coderay
272282
yard-mruby
273283

274284
BUNDLED WITH
275-
2.1.4
285+
2.2.0

_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)