{{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}} {{- define "content" -}} {{- $params := .Scratch.Get "params" -}} {{- $toc := $params.toc -}} {{- if eq $toc true -}} {{- $toc = .Site.Params.page.toc | default dict -}} {{- else if eq $toc false -}} {{- $toc = dict "enable" false -}} {{- end -}} {{- /* Auto TOC */ -}} {{- if ne $toc.enable false -}}

{{ T "contents" }}

{{- end -}} {{- /* Page Style */ -}} {{- if eq $params.pageStyle "wide" -}} {{- else -}} {{- end -}} {{- /* TOC Style */ -}} {{- if eq $toc.enable true -}} {{- if eq $toc.keepStatic true -}} {{- else -}} {{- end -}} {{- else if eq $toc.enable false -}} {{- end -}}
{{- /* Title */ -}}

{{ .Title }}

{{- /* Subtitle */ -}} {{- with $params.subtitle -}}

{{ . }}

{{- end -}} {{- /* Meta */ -}}
{{- /* Featured image */ -}} {{- $image := $params.featuredimage -}} {{- $width := "auto" -}} {{- $height := "auto" -}} {{- with .Resources.GetMatch (printf "**%s" $params.featuredimage) -}} {{- $image = .RelPermalink -}} {{- $width = .Width -}} {{- $height = .Height -}} {{- end -}} {{- with .Resources.GetMatch "featured-image" -}} {{- $image = .RelPermalink -}} {{- $width = .Width -}} {{- $height = .Height -}} {{- end -}} {{- with $image -}} {{- end -}} {{- /* Series list */ -}} {{- if $params.series | and $params.seriesNavigation -}} {{ range $key, $value := .Site.Taxonomies.series }} {{ if $key | in $params.series }} {{ $term := $.Site.GetPage "series" $key }}
{{ T "series" }} - {{ $term.Title }}
{{- end -}} {{ end }} {{- end -}} {{- /* Static TOC */ -}} {{- if ne $toc.enable false -}}
{{ T "contents" }}
{{- dict "Content" .TableOfContents "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
{{- end -}} {{- /* Content */ -}}
{{- /* Outdated Article Reminder */ -}} {{- partial "single/outdatedArticleReminder.html" . -}} {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
{{/* Sponsor */}} {{- partial "single/sponsor.html" . -}} {{- /* Footer */ -}} {{- partial "single/footer.html" . -}} {{- /* Comment */ -}} {{- partial "comment.html" . -}}
{{- end -}}