Skip to content

Commit

Permalink
Address CI lint failures by adding shortcode
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
caspark committed Jun 27, 2024
1 parent ab2ae56 commit 41c19ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/news/052/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ If needed, a section can be split into subsections with a "------" delimiter.
## Game Updates

### [Untitled Pixel Wizards Game][pixel-wizards]
<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!'"> />
</video>
_Enemies now perceive, pursue and attack.. and occasionally get burned to death._

{{ embed_video(type="video/mp4", src="untitled-pixel-wizards-game.mp4",
caption="Enemies now perceive, pursue and attack.. and occasionally get burned to death.") }}

[![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]
_Enemies now perceive, pursue and attack.. and occasionally get burned to death._
Expand Down
11 changes: 11 additions & 0 deletions templates/shortcodes/embed_video.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- {#
Embed a video into a markdown file. Example usage:
{{ embed_video(type="video/mp4", src="my-video.mp4", caption="Some caption.") }}
#} -->
<video controls autoplay muted loop>
<source
type="{{ type }}" src="{{ src }}"
onerror="parentNode.parentElement.innerText = 'Sorry, this video does not exist or your browser does not support the video codec. Try a different browser!'" />
</video> {% if caption %}<em>{{ caption }}</em>{% endif %}

0 comments on commit 41c19ef

Please sign in to comment.