From df232b84fa6d0ed3c549f8f57c78bebe124e783d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Wed, 23 Feb 2022 20:21:48 +0100 Subject: [PATCH] theme: remove Hugo build warning if page is not file based --- layouts/partials/header.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 }}