diff options
| -rw-r--r-- | Makefile | 5 | ||||
| -rw-r--r-- | content/posts/now-2026-spring/index.md | 3 | ||||
| -rw-r--r-- | content/posts/now-2026-summer/index.md | 3 | ||||
| -rw-r--r-- | templates_gmi/shortcodes/fig.html | 7 | ||||
| -rw-r--r-- | templates_html/shortcodes/fig.html | 7 |
5 files changed, 19 insertions, 6 deletions
@@ -25,9 +25,10 @@ build: clean .PHONY: dev dev: - @echo "Starting development server..." + unlink templates || true ln -s templates_html templates - zola serve --drafts + @echo "Starting development server..." + trap 'unlink templates || true' EXIT; zola serve --drafts .PHONY: deploy deploy: diff --git a/content/posts/now-2026-spring/index.md b/content/posts/now-2026-spring/index.md index e52a7cc..bea7591 100644 --- a/content/posts/now-2026-spring/index.md +++ b/content/posts/now-2026-spring/index.md @@ -2,7 +2,8 @@ title: 🌱 Now, spring 2026 date: 2026-04-12 description: Planning the wedding, reworking my wardrobe. Home reno. Dog escaped. -kind: now +extra: + kind: now --- Planning the wedding, reworking my wardrobe. Home reno. diff --git a/content/posts/now-2026-summer/index.md b/content/posts/now-2026-summer/index.md index 2ec84df..eab8cf2 100644 --- a/content/posts/now-2026-summer/index.md +++ b/content/posts/now-2026-summer/index.md @@ -2,7 +2,8 @@ title: ☀️ Now, summer 2026 date: 2026-06-01 description: TODO -kind: now +extra: + kind: now draft: true --- diff --git a/templates_gmi/shortcodes/fig.html b/templates_gmi/shortcodes/fig.html index 9988107..4e4b4c3 100644 --- a/templates_gmi/shortcodes/fig.html +++ b/templates_gmi/shortcodes/fig.html @@ -1 +1,6 @@ -=> {{ src }} {{ alt }} +{% if src is starting_with("/") %} +{% set img_src = src %} +{% else %} +{% set img_src = page.path ~ src %} +{% endif %} +=> {{ img_src }} {{ alt }} diff --git a/templates_html/shortcodes/fig.html b/templates_html/shortcodes/fig.html index 4ac99b4..14b3a5e 100644 --- a/templates_html/shortcodes/fig.html +++ b/templates_html/shortcodes/fig.html @@ -1,4 +1,9 @@ +{% if src is starting_with("/") %} +{% set img_src = src %} +{% else %} +{% set img_src = page.path ~ src %} +{% endif %} <figure> - <img src="{{ src }}" alt="{{ alt }}" /> + <img src="{{ img_src }}" alt="{{ alt }}" /> <figcaption aria-hidden="true">{{ alt }}</figcaption> </figure> |
