Allow going back in the directory structure

This commit is contained in:
Evan G. 2024-05-29 12:46:47 -05:00
parent d5a64c55fa
commit b507d458b0
1 changed files with 7 additions and 0 deletions

View File

@ -10,10 +10,17 @@ config change. -->
<a href="{{ .URL | absLangURL }}">{{ .Name }}</a>
{{ if eq $navbar_style "classy" }}</span>{{ end }}
{{- end }}
</nav>
<h1>{{ $.Site.Title }}</h1>
{{ else }}
<a href="/">Go Home</a>
{{ $path := .Path }}
{{ $bpath := path.Dir $path }}
{{ if eq $bpath "/" }}
{{ else }}
<a href="{{ $bpath }}">Back to {{ $bpath }}</a>
{{ end }}
</nav>
<p>{{ $.Site.Params.subtitle }}</p>
{{ end }}