aboutsummaryrefslogtreecommitdiff
path: root/_layouts/post.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--_layouts/post.html11
1 files changed, 6 insertions, 5 deletions
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>