From dfba891622d4a887a4c8e4511ebc6f6d2cc6172c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Tue, 28 Nov 2023 22:00:44 +0100 Subject: [PATCH] theme: run hugo demo site without warning #736 --- layouts/partials/archetype.hugo | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/layouts/partials/archetype.hugo b/layouts/partials/archetype.hugo index 45bcc7cfb8..1310b1e304 100644 --- a/layouts/partials/archetype.hugo +++ b/layouts/partials/archetype.hugo @@ -10,9 +10,15 @@ {{- else if $page.Params.archetype }} {{- $archetype = $page.Params.archetype }} {{- else if $page.Params.chapter }} - {{- $archetype = "deprecated-chapter" }} + {{- $archetype = "chapter" }} + {{- if findRE `(?s).*?` .Content }} + {{- $archetype = "deprecated-chapter" }} + {{- end }} {{- else if $page.IsHome }} - {{- $archetype = "deprecated-home" }} + {{- $archetype = "home" }} + {{- if findRE `(?s).*?` .Content }} + {{- $archetype = "deprecated-home" }} + {{- end }} {{- end }} {{- $f := printf "/layouts/partials/archetypes/%s" $archetype }} {{- if not (partialCached "fileExists.hugo" $f $f) }}