diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 7a1ff83a..5ab7bcc4 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -15,11 +15,11 @@ class="font-bold text-primary-600 ltr:pr-2 rtl:pl-2 dark:text-primary-400">↓{{ i18n "nav.skip_to_main" }} - {{ $header := print "partials/header/" .Site.Params.header.layout ".html" }} - {{ if templates.Exists $header }} + {{ $header := print "header/" .Site.Params.header.layout ".html" }} + {{ if templates.Exists ( printf "partials/%s" $header ) }} {{ partial $header . }} {{ else }} - {{ partial "partials/header/basic.html" . }} + {{ partial "header/basic.html" . }} {{ end }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 7cc92388..0b7d9098 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -2,11 +2,11 @@ {{ .Scratch.Set "scope" "list" }} {{ if .Site.Params.list.showHero | default false }} -{{ $heroStyle := print "partials/hero/" .Site.Params.list.heroStyle ".html" }} -{{ if templates.Exists $heroStyle }} +{{ $heroStyle := print "hero/" .Site.Params.list.heroStyle ".html" }} +{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }} {{ partial $heroStyle . }} {{ else }} -{{ partial "partials/hero/basic.html" . }} +{{ partial "hero/basic.html" . }} {{ end }} {{- end -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5defb34c..a1f2e818 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -5,11 +5,11 @@ {{ if .Params.showHero | default (.Site.Params.article.showHero | default false) }} {{ $heroStyle := .Params.heroStyle }} {{ if not $heroStyle }}{{ $heroStyle = .Site.Params.article.heroStyle }}{{ end }} - {{ $heroStyle := print "partials/hero/" $heroStyle ".html" }} - {{ if templates.Exists $heroStyle }} + {{ $heroStyle := print "hero/" $heroStyle ".html" }} + {{ if templates.Exists ( printf "partials/%s" $heroStyle ) }} {{ partial $heroStyle . }} {{ else }} - {{ partial "partials/hero/basic.html" . }} + {{ partial "hero/basic.html" . }} {{ end }} {{ end }} @@ -154,7 +154,7 @@ {{ partial "article-pagination.html" . }} {{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }} - {{ if templates.Exists "partials/comments.html" }} + {{ if templates.Exists "comments.html" }}

diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index 94859a69..43a850dc 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -2,11 +2,11 @@ {{ .Scratch.Set "scope" "list" }} {{ if .Site.Params.taxonomy.showHero | default false }} -{{ $heroStyle := print "partials/hero/" .Site.Params.taxonomy.heroStyle ".html" }} -{{ if templates.Exists $heroStyle }} +{{ $heroStyle := print "hero/" .Site.Params.taxonomy.heroStyle ".html" }} +{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }} {{ partial $heroStyle . }} {{ else }} -{{ partial "partials/hero/basic.html" . }} +{{ partial "hero/basic.html" . }} {{ end }} {{- end -}} diff --git a/layouts/_default/term.html b/layouts/_default/term.html index ae8c702e..74b9b646 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -2,11 +2,11 @@ {{ .Scratch.Set "scope" "term" }} {{ if .Site.Params.term.showHero | default false }} -{{ $heroStyle := print "partials/hero/" .Site.Params.term.heroStyle ".html" }} -{{ if templates.Exists $heroStyle }} +{{ $heroStyle := print "hero/" .Site.Params.term.heroStyle ".html" }} +{{ if templates.Exists ( printf "partials/%s" $heroStyle ) }} {{ partial $heroStyle . }} {{ else }} -{{ partial "partials/hero/basic.html" . }} +{{ partial "hero/basic.html" . }} {{ end }} {{- end -}} diff --git a/layouts/index.html b/layouts/index.html index ad851f50..3b35e78a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,8 +1,8 @@ {{ define "main" }} - {{ $partial := print "partials/home/" .Site.Params.homepage.layout ".html" }} - {{ if templates.Exists $partial }} + {{ $partial := print "home/" .Site.Params.homepage.layout ".html" }} + {{ if templates.Exists ( printf "partials/%s" $partial ) }} {{ partial $partial . }} {{ else }} - {{ partial "partials/home/profile.html" . }} + {{ partial "home/profile.html" . }} {{ end }} {{ end }} diff --git a/layouts/partials/article-link/simple.html b/layouts/partials/article-link/simple.html index 5a303622..5aaf1877 100644 --- a/layouts/partials/article-link/simple.html +++ b/layouts/partials/article-link/simple.html @@ -85,7 +85,7 @@ {{ partial "badge.html" (i18n "article.draft" | emojify) }}
{{ end }} - {{ if templates.Exists "partials/extend-article-link.html" }} + {{ if templates.Exists "extend-article-link.html" }} {{ partial "extend-article-link.html" . }} {{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index cce8ae9d..4d7e80c7 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -62,7 +62,7 @@ {{ $jsProcess = $jsProcess | resources.Minify | resources.Fingerprint "sha512" }} {{/* Extend footer - eg. for extra scripts, etc. */}} - {{ if templates.Exists "partials/extend-footer.html" }} + {{ if templates.Exists "extend-footer.html" }} {{ partialCached "extend-footer.html" . }} {{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 43635eba..57ead88d 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -80,7 +80,7 @@ {{ end }} {{/* Icons */}} - {{ if templates.Exists "partials/favicons.html" }} + {{ if templates.Exists "favicons.html" }} {{ partialCached "favicons.html" .Site }} {{ else }} @@ -123,7 +123,7 @@ {{/* Analytics */}} {{ partial "analytics/main.html" .Site }} {{/* Extend head - eg. for custom analytics scripts, etc. */}} - {{ if templates.Exists "partials/extend-head.html" }} + {{ if templates.Exists "extend-head.html" }} {{ partialCached "extend-head.html" .Site }} {{ end }} diff --git a/layouts/partials/header/fixed-fill-blur.html b/layouts/partials/header/fixed-fill-blur.html index 534fe989..02160bfe 100644 --- a/layouts/partials/header/fixed-fill-blur.html +++ b/layouts/partials/header/fixed-fill-blur.html @@ -2,7 +2,7 @@
- {{ partial "partials/header/basic.html" . }} + {{ partial "header/basic.html" . }}