Skip to content

Commit ef98066

Browse files
committed
Address CI lint failures by adding shortcode
Shortcode is apparently necessary because raw HTML tags are not allowed - and that fixes the line length violation too. The double commenting in the shortcode of '<!-- {#' is necessary to ensure that the comment is syntax-highlighted nicely and that Tera does not try to interpret the example snippet as a macro invocation.
1 parent ab2ae56 commit ef98066

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

content/news/052/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ If needed, a section can be split into subsections with a "------" delimiter.
7272
## Game Updates
7373

7474
### [Untitled Pixel Wizards Game][pixel-wizards]
75-
<video controls autoplay muted loop> <source type="video/mp4" src="untitled-pixel-wizards-game.mp4" onerror="parentNode.parentElement.innerText = 'Sorry, your browser does not support the video codec. Try a different browser!'"> />
76-
</video>
77-
_Enemies now perceive, pursue and attack.. and occasionally get burned to death._
75+
76+
{{ embed_video(type="video/mp4", src="untitled-pixel-wizards-game.mp4",
77+
caption="Enemies now perceive, pursue and attack.. and occasionally get burned to death.") }}
7878

7979
[![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]
8080
_Enemies now perceive, pursue and attack.. and occasionally get burned to death._

templates/shortcodes/embed_video.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- {#
2+
Embed a video into a markdown file. Example usage:
3+
4+
{{ embed_video(type="video/mp4", src="my-video.mp4", caption="Some caption.") }}
5+
6+
#} -->
7+
<video controls autoplay muted loop>
8+
<source
9+
type="{{ type }}" src="{{ src }}"
10+
onerror="parentNode.parentElement.innerText = 'Sorry, this video does not exist or your browser does not support the video codec. Try a different browser!'">
11+
/>
12+
</video> {% if caption %}<em>{{ caption }}</em>{% endif %}

0 commit comments

Comments
 (0)