diff options
Diffstat (limited to '')
-rw-r--r-- | _layouts/default.html | 8 | ||||
-rw-r--r-- | _layouts/post.html | 6 | ||||
-rw-r--r-- | default.nix | 5 |
3 files changed, 13 insertions, 6 deletions
diff --git a/_layouts/default.html b/_layouts/default.html index dafb042..a553db6 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -9,10 +9,10 @@ <link rel="alternate" type="application/atom+xml" href="{{ site.t.pastebins.feed.url[page.lang] }}" hreflang="{{ page.lang }}" title="{{ site.t.pastebins.feed.title[page.lang] }}" /> <link rel="alternate" type="application/atom+xml" href="{{ site.t.tils.feed.url[page.lang] }}" hreflang="{{ page.lang }}" title="{{ site.t.tils.feed.title[page.lang] }}" /> <link rel="alternate" type="application/atom+xml" href="{{ site.t.slides.feed.url[page.lang] }}" hreflang="{{ page.lang }}" title="{{ site.t.slides.feed.title[page.lang] }}" /> - {% if site.podcast %} + {% if site.flags.podcast %} <link rel="alternate" type="application/atom+xml" href="{{ site.t.podcasts.feed.url[page.lang] }}" hreflang="{{ page.lang }}" title="{{ site.t.podcasts.feed.title[page.lang] }}" /> {% endif %} - {% if site.screencast %} + {% if site.flags.screencast %} <link rel="alternate" type="application/atom+xml" href="{{ site.t.screencasts.feed.url[page.lang] }}" hreflang="{{ page.lang }}" title="{{ site.t.screencasts.feed.title[page.lang] }}" /> {% endif %} @@ -48,10 +48,10 @@ <a href="{% link {{ site.t.tils.url[page.lang] }} %}">{{ site.t.tils.name[page.lang] }}</a> <a href="{% link {{ site.t.slides.url[page.lang] }} %}">{{ site.t.slides.name[page.lang] }}</a> <a href="{% link {{ site.t.pastebins.url[page.lang] }} %}">{{ site.t.pastebins.name[page.lang] }}</a> - {% if site.podcast %} + {% if site.flags.podcast %} <a href="{% link {{ site.t.podcasts.url[page.lang] }} %}">{{ site.t.podcasts.name[page.lang] }}</a> {% endif %} - {% if site.screencast %} + {% if site.flags.screencast %} <a href="{% link {{ site.t.screencasts.url[page.lang] }} %}">{{ site.t.screencasts.name[page.lang] }}</a> {% endif %} <a href="{% link {{ site.t.about.url[page.lang] }} %}">{{ site.t.about.name[page.lang] }}</a> diff --git a/_layouts/post.html b/_layouts/post.html index 02f5bcb..1ba6d6e 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -29,6 +29,12 @@ layout: default {% endif %} {% if page.video %} + {% 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"> + </video> + {% endif %} + <div class="torrent-link"> {% capture torrent-file %}{{ site.url }}/resources/screencasts/{{ page.date | date: "%Y-%m-%d" }}-{{ page.slug }}.mkv.torrent{% endcapture %} <a href="{{ torrent-file }}">torrent</a> diff --git a/default.nix b/default.nix index fc84d6e..e36a40f 100644 --- a/default.nix +++ b/default.nix @@ -61,15 +61,16 @@ in rec { echo 'Starting a live server with:' echo ' jekyll serve --future --livereload --trace' echo 'Server with feature flags:' - echo ' jekyll serve --future --livereload --trace -c $(cfg podcast screencast)' + echo ' jekyll serve --future --livereload --trace -c $(cfg podcast screencast direct-video)' export JEKYLL_ENV=production cfg() { T="$(mktemp --suffix .yml)" cp _config.yml "$T" + printf 'flags:' >> "$T" for flag in "$@"; do - printf '\n%s: true\n' "$flag" >> "$T" + printf '\n %s: true' "$flag" >> "$T" done echo "$T" } |