{{- $content := .Content -}} {{- $contents := partial "contents.html" . -}} {{- .Store.Set "contents" $contents -}} {{- $hasContents := and .IsPage (eq .Section "writing") (ge (len (findRE ` {{ $theme := resources.Get "js/theme-init.js" | minify }} {{ $title := partial "text.html" .Title | plainify | htmlUnescape }} {{ $description := partial "text.html" (.Description | default site.Params.description) | plainify | htmlUnescape }} {{ $documentTitle := $title }} {{ if not .IsHome }}{{ $documentTitle = printf "%s · %s" $title site.Title }}{{ end }} {{ $documentTitle }} {{ if site.Params.preview }}{{ end }} {{ $type := cond (and .IsPage (eq .Section "writing")) "article" "website" }} {{ $css := resources.Get "css/style.css" | minify | fingerprint }} {{ range .AlternativeOutputFormats }} {{ if eq .Name "RSS" }} {{ end }} {{ end }} {{ if or (.Store.Get "hasMath") .Params.math }} {{ end }} {{ partial "structured-data.html" . }} {{ partial "header.html" . }}
{{ block "main" . }}{{ end }}
{{ partial "footer.html" . }} {{ $js := resources.Get "js/main.js" | minify | fingerprint }} {{ if $hasContents }} {{ $navigation := resources.Get "js/contents.js" | minify | fingerprint }} {{ end }} {{ if strings.Contains $content "class=\"footnote-ref\"" }} {{ $footnotes := resources.Get "js/footnotes.js" | minify | fingerprint }} {{ end }}