From b507d458b0cb6a04d4971f8210fcfaf73a8dc228 Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Wed, 29 May 2024 12:46:47 -0500 Subject: [PATCH] Allow going back in the directory structure --- layouts/partials/header.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index edd8e43..9d72ebf 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -10,10 +10,17 @@ config change. --> {{ .Name }} {{ if eq $navbar_style "classy" }}{{ end }} {{- end }} +

{{ $.Site.Title }}

{{ else }} Go Home +{{ $path := .Path }} +{{ $bpath := path.Dir $path }} +{{ if eq $bpath "/" }} +{{ else }} +Back to {{ $bpath }} +{{ end }}

{{ $.Site.Params.subtitle }}

{{ end }}