docs/themes/hugo-geekdoc/layouts/partials/page-header.html
{{ $geekdocRepo := default (default false .Site.Params.geekdocRepo) .Page.Params.geekdocRepo }} {{ $geekdocEditPath := default (default false .Site.Params.geekdocEditPath) .Page.Params.geekdocEditPath }} {{ if .File }} {{ $.Scratch.Set "geekdocFilePath" (default (strings.TrimPrefix hugo.WorkingDir .File.Filename) .Page.Params.geekdocFilePath) }} {{ else }} {{ $.Scratch.Set "geekdocFilePath" false }} {{ end }} {{ define "breadcrumb" }} {{ $parent := .page.Parent }} {{ if $parent }} {{ $name := (partial "utils/title" $parent) }} {{ $position := (sub .position 1) }} {{ $value := (printf "
{{ end }} {{ if $showEdit }} [{{ i18n "edit_page" }}]({{%20$geekdocRepo%20}}/{{%20path.Join%20$geekdocEditPath%20($.Scratch.Get) {{ end }}