include partials if they exist given theme

master
Bel LaPointe 2021-11-29 15:53:54 -07:00
parent 6efca3bc62
commit 1b2d58c619
3 changed files with 16 additions and 7 deletions

View File

@ -11,13 +11,17 @@
<header class="post-header">
<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title " " }}</h1>
{{ if templates.Exists "partials/theme-switcher.html" }}
{{ partial "post-language-switcher.html" . }}
{{ end }}
</header>
{{ partial "post-toc.html" . }}
<div class="content e-content">
{{ .Content }}
</div>
{{ if templates.Exists "partials/post-info.html" }}
{{ partial "post-info.html" . }}
{{ end }}
</article>
{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }}

View File

@ -24,8 +24,12 @@
</p>
</div>
{{ if templates.Exists "partials/theme-switcher.html" }}
{{ partial "theme-switcher.html" . }}
{{ end }}
</div>
{{ if templates.Exists "partials/h-card.html" }}
{{ partial "h-card.html" . }}
{{ end }}
</footer>

View File

@ -13,6 +13,7 @@ rssLimit: 5
canonifyurls: true
relativeurls: false
params:
layout: "1"
toc: true
author: bel
email: bel@bel.bel