Skip to content

Commit

Permalink
Improve RSS experience (install 'jekyll-feed' plugin)
Browse files Browse the repository at this point in the history
- Use 'jekyll-feed' plugin to manage RSS feed and remove existing feed.xml file
- Add feed image in main blog tab ('All posts')

The 'jekyll-feed' plugin makes possible for aggregators to automatically detect the existence of a feed (feed_meta tag in header)
and creates a 'feed.atom' file containing the last 20 blog posts and locates it in the root directory. The structure is compatible
with our current system, including the possibility to show a picture if it's included in the post (monero-project#1002).
  • Loading branch information
erciccione committed Jun 22, 2020
1 parent 79f34d3 commit 283479c
Show file tree
Hide file tree
Showing 21 changed files with 63 additions and 41 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -6,3 +6,4 @@ gem 'builder'
gem 'rubysl-rexml'
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
gem 'jekyll-multiple-languages-plugin'
gem 'jekyll-feed'
3 changes: 3 additions & 0 deletions Gemfile.lock
Expand Up @@ -28,6 +28,8 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-feed (0.11.0)
jekyll (~> 3.3)
jekyll-multiple-languages-plugin (1.5.1)
jekyll (>= 2.0, < 4.0)
jekyll-paginate (1.1.0)
Expand Down Expand Up @@ -62,6 +64,7 @@ PLATFORMS
DEPENDENCIES
builder
jekyll
jekyll-feed
jekyll-multiple-languages-plugin
jekyll-paginate
rubysl-rexml
Expand Down
5 changes: 5 additions & 0 deletions _config.yml
Expand Up @@ -22,6 +22,11 @@ paginate_path: blog/page:num/
plugins:
- jekyll-paginate
- jekyll-multiple-languages-plugin
- jekyll-feed

feed:
path: feed.atom
posts_limit: 20

# jekyll-multiple-languages-plugin settings:
languages: ["en", "es", "it", "pl", "fr", "ar", "ru", "de", "nl", "pt-br", "tr", "zh-cn", "zh-tw"]
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/ar/footer-1.yml
Expand Up @@ -9,7 +9,7 @@
- name: دليل المستخدم
url: resources/user-guides/
- name: RSS Feed
url: https://getmonero.org/feed.xml
url: feed.atom
- title: IRC قنوات الدردشة
subfolderitems:
- name: مونيرو
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/de/footer-1.yml
Expand Up @@ -11,7 +11,7 @@
- name: Bibliothek
url: library
- name: RSS-Feed
url: https://getmonero.org/feed.xml
url: feed.atom
- title: IRC-Channels
subfolderitems:
- name: monero
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/en/footer-1.yml
Expand Up @@ -11,7 +11,7 @@
- name: Library
url: library
- name: RSS Feed
url: rss
url: feed.atom
- title: IRC Channels
subfolderitems:
- name: monero
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/es/footer-1.yml
Expand Up @@ -11,7 +11,7 @@
- name: Librería
url: library
- name: RSS Feed
url: https://getmonero.org/feed.xml
url: feed.atom
- title: Canales IRC
subfolderitems:
- name: monero
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/fr/footer-1.yml
Expand Up @@ -11,7 +11,7 @@
- name: Librairie
url: library
- name: Flux RSS
url: https://getmonero.org/feed.xml
url: feed.atom
- title: Canaux IRC
subfolderitems:
- name: monero
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/it/footer-1.yml
Expand Up @@ -11,7 +11,7 @@
- name: Libreria
url: library
- name: Feed RSS
url: https://getmonero.org/feed.xml
url: feed.atom
- title: Chat IRC
subfolderitems:
- name: monero
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/nl/footer-1.yml
Expand Up @@ -11,7 +11,7 @@
- name: Bibliotheek
url: library
- name: RSS-kanaal
url: https://getmonero.org/feed.xml
url: feed.atom
- title: IRC-kanalen
subfolderitems:
- name: monero
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/pl/footer-1.yml
Expand Up @@ -11,7 +11,7 @@
- name: Księgarnia
url: library
- name: Kanał RSS
url: https://getmonero.org/feed.xml
url: feed.atom
- title: Kanały IRC
subfolderitems:
- name: monero
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/pt-br/footer-1.yml
Expand Up @@ -11,7 +11,7 @@
- name: Biblioteca
url: library
- name: RSS Feed
url: https://getmonero.org/feed.xml
url: feed.atom
- title: Canais no IRC
subfolderitems:
- name: monero
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/ru/footer-1.yml
Expand Up @@ -11,7 +11,7 @@
- name: Библиотека
url: library
- name: Канал RSS
url: https://getmonero.org/feed.xml
url: feed.atom
- title: Каналы IRC
subfolderitems:
- name: monero
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/tr/footer-1.yml
Expand Up @@ -11,7 +11,7 @@
- name: Kütüphane
url: library
- name: RSS Besleme
url: https://getmonero.org/feed.xml
url: feed.atom
- title: IRC Kanalları
subfolderitems:
- name: monero
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/zh-cn/footer-1.yml
Expand Up @@ -11,7 +11,7 @@
- name: Library
url: library
- name: RSS Feed
url: https://getmonero.org/feed.xml
url: feed.atom
- title: IRC Channels
subfolderitems:
- name: monero
Expand Down
2 changes: 1 addition & 1 deletion _data/lang/zh-tw/footer-1.yml
Expand Up @@ -11,7 +11,7 @@
- name: 圖書出版品
url: library
- name: RSS 摘要
url: https://getmonero.org/feed.xml
url: feed.atom
- title: IRC 頻道
subfolderitems:
- name: monero
Expand Down
3 changes: 3 additions & 0 deletions _includes/head.html
Expand Up @@ -47,4 +47,7 @@

<meta name="msapplication-config" content="/ietemplates/ieconfig.xml">

<!-- Expose helper tag to support automated discovery of blog feed -->
{% feed_meta %}

</head>
5 changes: 4 additions & 1 deletion blog/index.html
Expand Up @@ -39,7 +39,10 @@
<div class="row">
<!-- Full block-->
<div class="info-block">
<h2>{% t blog.allposts %}</h2>
<div class="feed">
<a href="/feed.atom"><span class="feed-pic"></span></a>
<h2>{% t blog.allposts %}</h2>
</div>
{% for post in paginator.posts %}
<div class="post-lead">
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
Expand Down
16 changes: 16 additions & 0 deletions css/custom.css
Expand Up @@ -3971,6 +3971,22 @@ h3#months {
border-bottom: 2px solid #a1aabb;
}

.info-block .feed h2 {
margin-top: 0;
}

.feed span {
height: 30px;
width: 30px;
display: block;
padding-right: 1rem;
}

.feed span.feed-pic {
background: url(../img/feed.svg) no-repeat;
float: right;
}

@media only screen and (max-width: 75rem) {
.page-numbers {
margin-top: 2rem;
Expand Down
27 changes: 0 additions & 27 deletions feed.xml

This file was deleted.

18 changes: 18 additions & 0 deletions img/feed.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 283479c

Please sign in to comment.