Skip to content

Commit d42ec68

Browse files
janhohenheimTau Gärtli
and
Tau Gärtli
committedJun 29, 2024
Fix page not rendering on missing video
Co-authored-by: Tau Gärtli <[email protected]>
1 parent 98edb8d commit d42ec68

File tree

4 files changed

+37
-39
lines changed

4 files changed

+37
-39
lines changed
 

Diff for: ‎content/news/052/index.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,7 @@ TODO: I'll be working on adding an email subscription this weekend, so I'll writ
8787
### [Untitled Pixel Wizards Game][pixel-wizards]
8888

8989
{{ embed_video(type="video/mp4", src="untitled-pixel-wizards-game.mp4",
90-
caption="Enemies now perceive, pursue and attack.. and occasionally get burned to death.") }}
91-
92-
[![A Hound chases a player, and its corpse ragdolls after it is burned to death by a fireball](untitled-pixel-wizards-game.gif)][pixel-wizards]
93-
_Enemies now perceive, pursue and attack.. and occasionally get burned to death._
90+
caption="Enemies now perceive, pursue and attack.. and occasionally get burned to death.") }}
9491

9592
[Untitled Pixel Wizards Game][pixel-wizards] is a local-multiplayer [Noita]-like platformer about
9693
killing baddies using spells powered by pixel physics. This month was focused on juicing up said baddies:

Diff for: ‎content/news/052/untitled-pixel-wizards-game.gif

-1.72 MB
Binary file not shown.

Diff for: ‎templates/post.html

+35-33
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,46 @@
11
{% extends "index.html" %}
22

33
{% block seo %}
4-
<title>{{ page.title }} | {{ config.title | default(value="Minima") }}</title>
4+
<title>{{ page.title }} | {{ config.title | default(value="Minima") }}</title>
55

6-
<meta property="og:title" content="{{ page.title }}">
7-
<meta property="og:url" content="{{ page.permalink }}">
8-
<meta property="og:description" content="{{ page.summary | default(value=page.content | safe | striptags | trim | truncate(length=100)) }}">
9-
<meta property="og:type" content="article">
10-
<link rel="canonical" href="{{ page.permalink }}">
6+
<meta property="og:title" content="{{ page.title }}">
7+
<meta property="og:url" content="{{ page.permalink }}">
8+
<meta property="og:description"
9+
content="{{ page.summary | default(value=page.content | safe | striptags | trim | truncate(length=100)) }}">
10+
<meta property="og:type" content="article">
11+
<link rel="canonical" href="{{ page.permalink }}">
1112

12-
{% if page.date %}
13-
<meta property="article:published_time" content="{{ page.date | date(format='%+') }}">
14-
{% endif %}
13+
{% if page.date %}
14+
<meta property="article:published_time" content="{{ page.date | date(format='%+') }}">
15+
{% endif %}
1516
{% endblock seo %}
1617

1718
{% block content %}
18-
<article class="post h-entry wrapper" itemscope itemtype="http://schema.org/BlogPosting">
19-
<header class="post-header">
20-
<h1 class="post-title p-name" itemprop="name headline">{{ page.title }}</h1>
21-
<p class="post-meta">
22-
{% if page.date %}
23-
<time class="dt-published" datetime="{{ page.date | date(format='%+') }}" itemprop="datePublished">
24-
{% set date_format = config.extra.date_format | default(value="%b %-d, %Y") %}
25-
{{ page.date | date(format=date_format) }}
26-
</time>
27-
{% endif %}
28-
{% if page.author %}
29-
<span itemprop="author" itemscope itemtype="http://schema.org/Person"><span class="p-author h-card" itemprop="name">{{ page.author }}</span></span>
30-
{% endif %}
31-
</p>
32-
</header>
19+
<article class="post h-entry wrapper" itemscope itemtype="http://schema.org/BlogPosting">
20+
<header class="post-header">
21+
<h1 class="post-title p-name" itemprop="name headline">{{ page.title }}</h1>
22+
<p class="post-meta">
23+
{% if page.date %}
24+
<time class="dt-published" datetime="{{ page.date | date(format='%+') }}" itemprop="datePublished">
25+
{% set date_format = config.extra.date_format | default(value="%b %-d, %Y") %}
26+
{{ page.date | date(format=date_format) }}
27+
</time>
28+
{% endif %}
29+
{% if page.author %}
30+
<span itemprop="author" itemscope itemtype="http://schema.org/Person"><span class="p-author h-card"
31+
itemprop="name">{{ page.author }}</span></span>
32+
{% endif %}
33+
</p>
34+
</header>
3335

34-
<div class="post-content e-content" itemprop="articleBody">
35-
{{ page.content | safe }}
36-
</div>
36+
<div class="post-content e-content" itemprop="articleBody">
37+
{{ page.content | safe }}
38+
</div>
3739

38-
{% if site.disqus.shortname %}
39-
{% include "includes/disqus_comments.html" %}
40-
{% endif %}
40+
{% if site.disqus.shortname %}
41+
{% include "includes/disqus_comments.html" %}
42+
{% endif %}
4143

42-
<a class="u-url" href="{{ page.permalink }}" hidden></a>
43-
</article>
44-
{% endblock content %}
44+
<a class="u-url" href="{{ page.permalink }}" hidden></a>
45+
</article>
46+
{% endblock content %}

Diff for: ‎templates/shortcodes/embed_video.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55
66
#} -->
77
<video controls autoplay muted loop>
8-
<source type="{{ type }}" src="{{ src }}"
9-
onerror="parentNode.parentElement.innerText = 'Sorry, this video does not exist or your browser does not support the video codec. Try a different browser!'" />
8+
<source type="{{ type }}" src="{{ get_url(path=page.colocated_path ~ src)}}" />
109
</video> {% if caption %}<em>{{ caption }}</em>{% endif %}

0 commit comments

Comments
 (0)