Skip to content

Commit 23918f8

Browse files
committed
Add language support and improve post handling in template
1 parent 55334a9 commit 23918f8

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

blueprints.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Medium RSS Plugin
22
description: A plugin for Grav CMS that fetches the RSS profile page feed from Medium and displays the titles and teasers of your articles in a list.
3-
version: 1.2.0
3+
version: 1.3.0
44
icon: medium
55
homepage: https://github.com/samuelstein/mediumrss
66
author:

languages.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
de:
2+
PLUGIN_MEDIUMRSS:
3+
NO_POSTS: 'Keine Beiträge gefunden.'
4+
en:
5+
PLUGIN_MEDIUMRSS:
6+
NO_POSTS: 'No posts found.'

templates/medium.html.twig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
<div id="rss-feed">
99
<h2>Recent posts</h2>
1010
<ul id="rss-feed-list">
11-
{{ fetchMediumRSS|raw }}
11+
{% if fetchMediumRSS is not empty %}
12+
{{ fetchMediumRSS|raw }}
13+
{% else %}
14+
<li style="list-style-type:none;">{{ 'PLUGIN_MEDIUMRSS.NO_POSTS'|t }}</li>
15+
{% endif %}
1216
</ul>
1317
</div>
1418
{% endblock %}

0 commit comments

Comments
 (0)