🐛 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
2025-06-05 15:37:55 +08:00
parent 850f987a68
commit 58f0e30d65
2 changed files with 44 additions and 1 deletions

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" }}