From f66ca6a07d8f148ff289711a99539c957c62d174 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Sun, 13 Feb 2022 22:48:38 +0100 Subject: [PATCH] fix: fix broken `Edit Page` links (#339) --- .gitignore | 3 +++ layouts/partials/page-header.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 470fb8c..2042e76 100644 --- a/.gitignore +++ b/.gitignore @@ -21,5 +21,8 @@ exampleSite/content/de /exampleSite/resources/ /exampleSite/data/sprites/ +# hugo +.hugo_build.lock + # testing .lighthouseci/ diff --git a/layouts/partials/page-header.html b/layouts/partials/page-header.html index 9d94525..2aee8ce 100644 --- a/layouts/partials/page-header.html +++ b/layouts/partials/page-header.html @@ -1,7 +1,7 @@ {{ $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 .File.Path .Page.Params.GeekdocFilePath) }} + {{ $.Scratch.Set "geekdocFilePath" (default (path.Join .File.Lang .File.Path) .Page.Params.GeekdocFilePath) }} {{ else }} {{ $.Scratch.Set "geekdocFilePath" false }} {{ end }}