{{- define "head" }} {{- /* MathML render engine */}} {{- if or .Params.Math site.Params.Math }} {{ partialCached "head/js/katex.html" . }} {{- else if or .Params.MathJax site.Params.MathJax }} {{ partialCached "head/js/mathjax.html" . }} {{- end }} {{- /* Verbatim Style {{- with findRE `class="chroma"` .Content 1 }} {{ partialCached "head/css/verbatim.html" $ }} {{- end }} */}} {{- /* use Highlight.js */}} {{- if .Params.Hljs -}} {{ partialCached "head/js/hljs.html" . }} {{- end }} {{- end }} {{- define "main" }} {{- $isPost := eq .Params.type (or "post" "articles") }} {{- $sf := or site.Params.Posts.sfdefault .Params.sfdefault }}
{{- $series := .GetTerms "series" }} {{- $stage := .GetTerms "stage" }} {{ if or $series $stage }} {{- with $series }} {{- range . | first 1 }} {{ .Title }} {{- end }} {{- end }} {{- with $stage }} {{- range . | first 1 }} {{- $ic := or .Params.indicator .Params.icon .Params.badge }} {{- if .Params.emoji }} {{ .Params.emoji }} {{- else if $ic }} {{- else }} {{- end }} {{ .Title }} {{- end }} {{- end }} {{ end }} {{ partial "page/title.html" . }} {{- if $isPost }}
{{- $author := cond .Params.author .Params.author site.Params.Author.name }} {{- $authors := or (.GetTerms "authors") (.GetTerms "author") }} {{- $notMultiAuthor := eq (len $authors) 1 }} {{- if $authors }} {{- if $notMultiAuthor }} {{- range $authors }} {{ $flair := .Params.flair }} {{- if $flair }} {{- $displayPicture := partial "page/cover.html" (dict "page" .) }} {{ .LinkTitle }} {{- end }} {{- .LinkTitle -}} {{- end }} {{- else }} {{ partial "terms.html" (dict "taxonomy" "author" "class" "delimiter" "page" .) }} {{- end }} {{- else if $author -}} {{ $author }} {{- end }}
{{ partial "page/timestamp.html" . }} {{- end }}
{{- with .Params.toc }} {{ partial "nav.html" (dict "navID" "TableOfContents" "page" $) }} {{- end }} {{ partial "page/audio.html" . }}
{{- if or .Params.task site.Params.Post.enableCheckbox }} {{ replace .Content "disabled=" "" | safeHTML }} {{- else }} {{ .Content }} {{- end }}
{{- if $isPost }} {{- end }}

{{- if not (or site.Params.BearMode site.Params.ZenMode) }} {{- end }} {{ if not site.Params.comments.disabled -}} {{- $toot := or .Params.toot .Params.mstd .Params.mastodon }} {{- $bsky := or .Params.skeet .Params.bsky .Params.bluesky }} {{- $giscus := isset .Site.Params "giscus" }} {{ if or $toot $bsky $giscus -}} {{ if not (or $toot $bsky) -}} {{ if ne .Params.comments false }} {{ partial "giscus.html" . }} {{ end }} {{- else }} {{ partial "fediverse.html" (dict "toot" $toot "bsky" $bsky ) }} {{- end }} {{- end }} {{- end }} {{- end }} {{- define "post" }} {{ "" | safeHTML }} {{- /* bionRead Snapshot */}} {{- end }}