{{- partial "meta.html" . }} {{- $link := "
" }}
{{ if and .Title (not (eq .Title .Site.Title)) }}{{ .Title }} {{ default "::" .Site.Params.titleSeparator }} {{ end}}{{ .Site.Title }}
{{- if not (and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) ) }} {{- else }} {{- range .AlternativeOutputFormats }} {{- if ne .Name "JSON" }} {{ (printf $link (.Permalink | relURL) .Rel .MediaType.Type ($.Site.Title | htmlEscape)) | safeHTML }} {{- end }} {{- end }} {{- end }} {{- if and (ne .Site.Params.disableSeoHiddenPages true) (ne .Site.Params.disableSearchHiddenPages true) }} {{- range .AlternativeOutputFormats }} {{- if eq .Name "JSON" }} {{ (printf $link (.Permalink | relURL) .Rel .MediaType.Type ($.Site.Title | htmlEscape)) | safeHTML }} {{- end }} {{- end }} {{- end }} {{- partial "favicon.html" . }} {{- partial "stylesheet.html" . }} {{- partial "custom-header.html" . }}
{{- $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev)) }} {{- if $showPrevNext }} {{- $parent := .Parent }} {{- $ispublished := true }} {{- if $parent }} {{- $ispublished = gt (int (len $parent.Permalink)) 0 }} {{- end }}
{{- if and $ispublished ($.Scratch.Get "relearnNextPage") }} {{- with ($.Scratch.Get "relearnNextPage") }}
{{- end }} {{- else }}
{{- end }}
{{- if and $ispublished ($.Scratch.Get "relearnPrevPage") }} {{- with ($.Scratch.Get "relearnPrevPage") }}
{{- end}} {{- else }}
{{- end}}
{{- end }} {{- with .OutputFormats.Get "PRINT" }}
{{- end -}} {{- if .Site.Params.editURL }} {{- $File := .File }} {{- $Site := .Site }} {{- if $File }} {{- with $File.Path }}
{{- end }} {{- end }} {{- end }} {{- $defaultDisableToc := .Site.Params.disableToc | default false }} {{- $currentDisableToc := .Params.disableToc | default $defaultDisableToc }} {{- $hastoc := not (eq 0 (int (len (.TableOfContents | plainify)))) }} {{- $toc := (and $hastoc (not $currentDisableToc)) }}
{{- if $toc }}
{{- end }} {{- $showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb)) }} {{- if $showBreadcrumb }}
{{- template "breadcrumb" dict "page" . }}
{{- else }}
{{ .Title }}
{{- end }}
{{- if $toc }} {{- partial "toc.html" . }} {{- end }}
{{- partial "tags.html" . }}
{{- define "breadcrumb" }} {{- $breadcrumb := slice }} {{- $page := .page }} {{- $breadcrumb = $breadcrumb | append $page }} {{- range seq (len .page.Site.Home.Pages) }} {{- $page = $page.Parent }} {{- if $page }} {{- $breadcrumb = $breadcrumb | append $page }} {{- else }} {{- break }} {{- end }} {{- end }} {{- $len := len $breadcrumb -}} {{- $breadcrumbReversed := slice }} {{- range seq $len }} {{- $breadcrumbReversed = $breadcrumbReversed | append (index $breadcrumb (sub $len .)) }} {{- end }} {{- $remaining := $len }} {{- $depth := 0 }} {{- range $i, $e := $breadcrumbReversed }} {{- $page := $e }} {{- $ispublished := gt (int (len $page.Permalink)) 0 }} {{- $remaining = sub $remaining 1 }} {{- if $ispublished }} {{- $depth = add $depth 1 }}
{{ if $remaining }}
{{end}}
{{ if $page.Title }}{{ $page.Title }}{{ else }}{{ $page.Site.Title }}{{ end }}
{{ if $remaining }}
{{ end }}
{{ if $remaining }} > {{ end }}
{{- end }} {{- end }} {{- end }}