d3c3nt

[DORMANT] a fairly decent theme for the zola static site engine
git clone git://git.figbert.com/d3c3nt.git
Log | Files | Refs | README | LICENSE

commit 7d52171a0e99c01697036a584fb6a2832600bf17
parent df962407acd27c59156644b77caab9775d0e1396
Author: FIGBERT <figbert@figbert.com>
Date:   Tue, 21 Dec 2021 01:07:13 -0800

Update shortcodes

Diffstat:
Mtemplates/shortcodes/audio.html | 4++--
Mtemplates/shortcodes/gif.html | 4++--
Mtemplates/shortcodes/image.html | 4++--
Mtemplates/shortcodes/video.html | 4++--
4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/templates/shortcodes/audio.html b/templates/shortcodes/audio.html @@ -1,7 +1,7 @@ <audio controls> {% for source in sources %} - {% set type = source | split(pat=".") | last %} - <source src="{{ source }}" type="{{ 'audio/' ~ type }}"> + {% set type = source | split(pat=".") | last %} + <source src="{{ config.base_url | safe }}{{ page.path | safe }}{{ source | safe }}" type="{{ 'audio/' ~ type }}"> {% endfor %} Your browser doesn't support the audio tag and/or the audio formats in use here – sorry! </audio> diff --git a/templates/shortcodes/gif.html b/templates/shortcodes/gif.html @@ -1,7 +1,7 @@ <video autoplay loop muted playsinline> {% for source in sources %} - {% set type = source | split(pat=".") | last %} - <source src="{{ source }}" type="{{ 'video/' ~ type }}"> + {% set type = source | split(pat=".") | last %} + <source src="{{ config.base_url | safe }}{{ page.path | safe }}{{ source | safe }}" type="{{ 'video/' ~ type }}"> {% endfor %} Your browser doesn't support the video tag, which I use in place of .gifs, and/or the video formats in use here – sorry! </video> diff --git a/templates/shortcodes/image.html b/templates/shortcodes/image.html @@ -1,7 +1,7 @@ <picture> {% for source in sources %} - {% set type = source | split(pat=".") | last %} - <source srcset="{{ source }}" type="{{ 'img/' ~ type }}"> + {% set type = source | split(pat=".") | last %} + <source srcset="{{ config.base_url | safe}}{{ page.path | safe }}{{ source | safe }}" type="{{ 'img/' ~ type }}"> {% endfor %} <img src="{{ fallback_path }}" alt="{{ fallback_alt }}"/> </picture> diff --git a/templates/shortcodes/video.html b/templates/shortcodes/video.html @@ -1,7 +1,7 @@ <video controls> {% for source in sources %} - {% set type = source | split(pat=".") | last %} - <source src="{{ source }}" type="{{ 'video/' ~ type }}"> + {% set type = source | split(pat=".") | last %} + <source src="{{ config.base_url | safe }}{{ page.path | safe }}{{ source | safe }}" type="{{ 'video/' ~ type }}"> {% endfor %} Your browser doesn't support the video tag and/or the video formats in use here – sorry! </video>