From 1b2d58c6192fb7ee5e78ef8d6836c09589666a7d Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Mon, 29 Nov 2021 15:53:54 -0700 Subject: [PATCH] include partials if they exist given theme --- blog/layouts/_default/single.html | 10 +++++++--- blog/layouts/partials/footer.html | 12 ++++++++---- meta/config.yaml | 1 + 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/blog/layouts/_default/single.html b/blog/layouts/_default/single.html index 224216e..4cdb04e 100644 --- a/blog/layouts/_default/single.html +++ b/blog/layouts/_default/single.html @@ -6,18 +6,22 @@ {{ end }} {{ end }} - +

{{ trim .Title " " }}

- {{ partial "post-language-switcher.html" . }} + {{ if templates.Exists "partials/theme-switcher.html" }} + {{ partial "post-language-switcher.html" . }} + {{ end }}
{{ partial "post-toc.html" . }}
{{ .Content }}
- {{ partial "post-info.html" . }} + {{ if templates.Exists "partials/post-info.html" }} + {{ partial "post-info.html" . }} + {{ end }}
{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }} diff --git a/blog/layouts/partials/footer.html b/blog/layouts/partials/footer.html index f310c8c..71fe201 100644 --- a/blog/layouts/partials/footer.html +++ b/blog/layouts/partials/footer.html @@ -21,11 +21,15 @@ +

+ - {{ partial "theme-switcher.html" . }} + {{ if templates.Exists "partials/theme-switcher.html" }} + {{ partial "theme-switcher.html" . }} + {{ end }} - {{ partial "h-card.html" . }} + {{ if templates.Exists "partials/h-card.html" }} + {{ partial "h-card.html" . }} + {{ end }} diff --git a/meta/config.yaml b/meta/config.yaml index fa59bc3..3d37a35 100644 --- a/meta/config.yaml +++ b/meta/config.yaml @@ -13,6 +13,7 @@ rssLimit: 5 canonifyurls: true relativeurls: false params: + layout: "1" toc: true author: bel email: bel@bel.bel