diff --git a/exampleSite/layouts/partials/shortcodes/piratify.html b/exampleSite/layouts/partials/shortcodes/piratify.html index 4098182259..0a5a67ec94 100644 --- a/exampleSite/layouts/partials/shortcodes/piratify.html +++ b/exampleSite/layouts/partials/shortcodes/piratify.html @@ -6,8 +6,15 @@ {{- $langsrc := cond (eq $context.Lang $langtrg) (.langsrc | default "en") $context.Lang }} {{- $baseURL := urls.Parse site.BaseURL }} {{- $baseURLpath := $baseURL.Path | default "/" }} -{{- $l := "" }} +{{- $l := $context.RelPermalink }} {{- $c := "" }} +{{- if ne $content nil }} + {{- $c = $content }} +{{- else if eq $pagefield "Content" }} + {{- $c = $context.Content }} +{{- else if eq $pagefield "TableOfContents" }} + {{- $c = $context.TableOfContents }} +{{- end }} {{- range $context.AllTranslations }} {{- if eq .Language.Lang $langsrc }} {{- $l = .RelPermalink }} diff --git a/layouts/404.html b/layouts/404.html index 595258d338..0cd3b8d7a1 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -5,12 +5,14 @@
{{- partial "meta.html" . }} {{- .Scratch.Add "title" "" }} + {{- $title := .Title }} {{- if eq .Site.Data.titles .Title }} - {{- .Scratch.Set "title" (index .Site.Data.titles .Title).title }} - {{- else }} - {{- .Scratch.Set "title" .Title}} + {{- $title = (index .Site.Data.titles .Title).title }} {{- end }} -