aboutsummaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--_includes/feed.atom22
1 files changed, 15 insertions, 7 deletions
diff --git a/_includes/feed.atom b/_includes/feed.atom
index b7a97ca..9297201 100644
--- a/_includes/feed.atom
+++ b/_includes/feed.atom
@@ -1,10 +1,14 @@
-{% assign is_audio=site.atom[include.kind].audio %}<?xml version="1.0" encoding="UTF-8"?>
- {% if is_audio %}
+{% assign
+ is_audio=site.atom[include.kind].audio
+%}{% assign
+ is_video=site.atom[include.kind].video
+%}<?xml version="1.0" encoding="UTF-8"?>
+ {% if is_audio or is_video %}
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.title | smartify | xml_escape }}</title>
- <description>{{ site.t.podcasts.feed.title[include.lang] | smartify | xml_escape }}</description>
+ <description>{{ site.t[include.kind].feed.title[include.lang] | smartify | xml_escape }}</description>
<link>{{ page.url | absolute_url | xml_escape }}</link>
<atom:link href="{{ page.url | absolute_url | xml_escape }}" rel="self" type="application/atom+xml" />
<language>{{ include.lang }}</language>
@@ -18,7 +22,7 @@
<image>
<url>{{ '/' | absolute_url | xml_escape }}static/favicon.png</url>
<link>{{ page.url | absolute_url | xml_escape }}</link>
- <title>{{ site.t.podcasts.feed.title }}</title>
+ <title>{{ site.t[include.kind].feed.title }}</title>
</image>
{% else %}
<feed
@@ -40,7 +44,7 @@
{% assign entries = include.entries | where:"lang", include.lang | has_category:include.categories_filter | sort: "date" | reverse %}
{% for entry in entries %}
- {% if is_audio %}
+ {% if is_audio or is_video %}
<item>
<title>{{ entry.title | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
<link>{{ entry.url | absolute_url | xml_escape }}</link>
@@ -48,7 +52,11 @@
<description xml:base="{{ entry.url | absolute_url | xml_escape }}">
{{ entry.content | strip | xml_escape }}
</description>
- <enclosure url="{{ '/' | absolute_url | xml_escape }}resources/podcasts/{{ include.lang }}/{{ entry.date | date: "%Y-%m-%d" }}-{{ entry.ref }}.ogg" type="audio/ogg" length="11779397" />
+ {% if is_audio %}
+ <enclosure url="{{ '/' | absolute_url | xml_escape }}resources/podcasts/{{ entry.date | date: "%Y-%m-%d" }}-{{ entry.ref }}.ogg" type="audio/ogg" />
+ {% elsif is_video %}
+ <enclosure url="{{ '/' | absolute_url | xml_escape }}resources/screencasts/{{ entry.date | date: "%Y-%m-%d" }}-{{ entry.ref }}.webm.torrent" type="application/x-bittorrent" />
+ {% endif %}
<category>EuAndreh</category>
<pubDate>{{ entry.date | date_to_xmlschema }}</pubDate>
</item>
@@ -74,7 +82,7 @@
{% endif %}
{% endfor %}
-{% if is_audio %}
+{% if is_audio or is_video %}
</channel>
</rss>
{% else %}