diff options
author | EuAndreh <eu@euandre.org> | 2020-12-28 16:39:57 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-12-28 16:50:21 -0300 |
commit | b812c4656cec76b3a59105dad095d8594de00d48 (patch) | |
tree | 0a79a2c511d3d459d3aa05281695873e46886609 | |
parent | _config.yml: Add missing :day component to screencasts collection permalink (diff) | |
download | euandre.org-b812c4656cec76b3a59105dad095d8594de00d48.tar.gz euandre.org-b812c4656cec76b3a59105dad095d8594de00d48.tar.xz |
post.html, feed.atom: Stop pointing to resources/ paths
-rw-r--r-- | _includes/feed.atom | 4 | ||||
-rw-r--r-- | _layouts/post.html | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/_includes/feed.atom b/_includes/feed.atom index f28ef45..93cd27c 100644 --- a/_includes/feed.atom +++ b/_includes/feed.atom @@ -53,9 +53,9 @@ {{ entry.content | strip | xml_escape }} </description> {% if is_audio %} - <enclosure url="{{ '/' | absolute_url | xml_escape }}resources/podcasts/{{ entry.date | date: "%Y-%m-%d" }}-{{ entry.ref }}.ogg" type="audio/ogg" /> + <enclosure url="{{ entry.url | replace: ".html", ".ogg" | absolute_url | xml_escape }}" type="audio/ogg" /> {% elsif is_video %} - <enclosure url="{{ '/' | absolute_url | xml_escape }}resources/screencasts/{{ entry.date | date: "%Y-%m-%d" }}-{{ entry.ref }}.mkv.torrent" type="application/x-bittorrent" /> + <enclosure url="{{ entry.url | replace: ".html", ".mkv.torrent" | absolute_url | xml_escape }}" type="application/x-bittorrent" /> {% endif %} <category>EuAndreh</category> <pubDate>{{ entry.date | date_to_xmlschema }}</pubDate> diff --git a/_layouts/post.html b/_layouts/post.html index 1ba6d6e..cb0e1b9 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -15,13 +15,13 @@ layout: default <section> {% if page.audio %} + {% assign ogg=page.url | replace_first: "/", "" | replace: ".html", ".ogg" %} <audio controls> - <source src="{% link /resources/podcasts/{{ page.date | date: "%Y-%m-%d" }}-{{ page.slug }}.ogg %}" type="audio/ogg"> - <source src="{% link /resources/podcasts/{{ page.date | date: "%Y-%m-%d" }}-{{ page.slug }}.flac %}" type="audio/flac"> + <source src="{% link {{ ogg }} %}" type="audio/ogg"> </audio> <div class="torrent-link"> - {% capture torrent-file %}{{ site.url }}/resources/podcasts/{{ page.date | date: "%Y-%m-%d" }}-{{ page.slug }}.ogg.torrent{% endcapture %} + {% capture torrent-file %}{{ ogg | absolute_url | append: ".torrent" }}{% endcapture %} <a href="{{ torrent-file }}">torrent</a> | <a href="/torrent.html?torrent={{ torrent-file | uri_escape }}">online webtorrent</a> @@ -29,14 +29,15 @@ layout: default {% endif %} {% if page.video %} + {% assign mkv=page.url | replace_first: "/", "" | replace: ".html", ".mkv" %} {% if site.flags.direct-video %} <video controls> - <source src="{% link /resources/screencasts/{{ page.date | date: "%Y-%m-%d" }}-{{ page.slug }}.mkv %}" type="video/x-matroska"> + <source src="{% link {{ mkv }} %}" type="video/x-matroska"> </video> {% endif %} <div class="torrent-link"> - {% capture torrent-file %}{{ site.url }}/resources/screencasts/{{ page.date | date: "%Y-%m-%d" }}-{{ page.slug }}.mkv.torrent{% endcapture %} + {% capture torrent-file %}{{ mkv | absolute_url | append: ".torrent" }}{% endcapture %} <a href="{{ torrent-file }}">torrent</a> | <a href="/torrent.html?torrent={{ torrent-file | uri_escape }}">online webtorrent</a> |