Add front matter for various display options

This commit is contained in:
James Panther
2021-08-15 11:21:37 +10:00
parent 73218ce192
commit 491d356d15
6 changed files with 27 additions and 19 deletions
+1 -1
View File
@@ -1 +1 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a class="heading-anchor" href="#{{ .Anchor | safeURL }}" aria-label="Anchor">#</a></h{{ .Level }}>
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} {{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}<a class="heading-anchor" href="#{{ .Anchor | safeURL }}" aria-label="Anchor">#</a>{{ end }}</h{{ .Level }}>
+1 -1
View File
@@ -17,7 +17,7 @@
{{ .Content | emojify }}
</section>
<footer>
{{ partialCached "author.html" . }}
{{ partial "author.html" . }}
{{ partial "article-pagination.html" . }}
</footer>
{{/* Comments */}}
+1 -1
View File
@@ -1,4 +1,4 @@
{{ if .Site.Params.article.showPagination | default true }}
{{ if .Params.showPagination | default (.Site.Params.article.showPagination | default true) }}
{{ if or .NextInSection .PrevInSection }}
<div class="pt-8">
<hr class="border-gray-300 border-dotted dark:border-gray-600" />
+1 -1
View File
@@ -1,4 +1,4 @@
{{ if .Site.Params.article.showAuthor | default true }}
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
<div class="flex items-center pt-8">
{{ with .Site.Author.image }}
<img class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full" src="{{ . }}" />