You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a shared page resource (e.g., image) on a multilingual single-host site, we do not (by default) duplicate the resource for each language, as designed. In this configuration we automatically enable an embedded image render hook to handle markdown destinations, but the embedded figure shortcode does not use the same logic, resulting in broken images.
We need to do this:
{{- $u := urls.Parse (.Get "src") -}}
{{- $src := $u.String -}}
{{- if not $u.IsAbs -}}
{{- with or (.Page.Resources.Get $u.Path) (resources.Get $u.Path) -}}
{{- $src = .RelPermalink -}}
{{- end -}}
{{- end -}}
This should be safe regardless of site configuration. We're not touching external destinations, and we fall back to the original value if we can't find a page resource or global resource.
The text was updated successfully, but these errors were encountered:
jmooring
changed the title
Modify embedded figure shortcode to look for local page resource
Modify embedded figure shortcode to look for page resource
Mar 14, 2024
Reference: #12244
With a shared page resource (e.g., image) on a multilingual single-host site, we do not (by default) duplicate the resource for each language, as designed. In this configuration we automatically enable an embedded image render hook to handle markdown destinations, but the embedded figure shortcode does not use the same logic, resulting in broken images.
We need to do this:
This should be safe regardless of site configuration. We're not touching external destinations, and we fall back to the original value if we can't find a page resource or global resource.
The text was updated successfully, but these errors were encountered: