diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 74a5d460ec..2865bc848c 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -59,12 +59,14 @@ {{- if .Site.Params.editURL }} {{- $File := .File }} {{- $Site := .Site }} - {{- with $File.Path }} + {{- if $File }} + {{- with $File.Path }} + {{- end }} {{- end }} {{- end }} {{- $defaultDisableToc := .Site.Params.disableToc | default false }}