From b91fb6e9e7ac74eb284467cc9f4f5fae590b900a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sun, 12 Nov 2023 23:44:36 +0100 Subject: [PATCH] theme: break build if minimum Hugo version is not matched #719 --- layouts/partials/header.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 58da2633c6..fe499f19d1 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -5,6 +5,12 @@ {{- if eq $outputFormat "searchpage" }} {{- $basename = partial "BaseName.hugo" $format.RelPermalink }} {{- end }} +{{- if eq . .Site.Sites.First.Home }} + {{- $minHugoVersion := "0.95.0" }} + {{- if lt hugo.Version $minHugoVersion }} + {{- errorf "The Relearn theme requires Hugo %s or later" $minHugoVersion }} + {{- end }} +{{- end }} {{- partial "meta.html" . }}