🐛 fix: add default figure shortcode as partial

Hugo v0.146 removed access to embedded templates like "_internal/shortcodes/figure.html".
This commit adds the template as figure-default.html.

This fixes build errors reported and partially solved in issues #2052 and #2093
when using the figure shortcode with the "default=true" option.
This commit is contained in:
kirill.chalov committed 2025-06-05 16:34:12 +08:00
1 parent 850f987a68
commit 58f0e30d65
2 files changed
+44 -1

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
{{ if .Get "default" }}
{{ partial "shortcodes/figure.html" . }}
{{ partial "hugo-embedded/shortcodes/figure-default.html" . }}
{{ else }}
{{- $url := urls.Parse (.Get "src") }}
{{- $altText := .Get "alt" }}