theme: run hugo demo site without warning #736

This commit is contained in:
Sören Weber 2023-11-28 22:00:44 +01:00
parent 9227dfd41f
commit dfba891622
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -10,9 +10,15 @@
{{- else if $page.Params.archetype }} {{- else if $page.Params.archetype }}
{{- $archetype = $page.Params.archetype }} {{- $archetype = $page.Params.archetype }}
{{- else if $page.Params.chapter }} {{- else if $page.Params.chapter }}
{{- $archetype = "deprecated-chapter" }} {{- $archetype = "chapter" }}
{{- if findRE `(?s)<h1.*?>.*?</h1>` .Content }}
{{- $archetype = "deprecated-chapter" }}
{{- end }}
{{- else if $page.IsHome }} {{- else if $page.IsHome }}
{{- $archetype = "deprecated-home" }} {{- $archetype = "home" }}
{{- if findRE `(?s)<h1.*?>.*?</h1>` .Content }}
{{- $archetype = "deprecated-home" }}
{{- end }}
{{- end }} {{- end }}
{{- $f := printf "/layouts/partials/archetypes/%s" $archetype }} {{- $f := printf "/layouts/partials/archetypes/%s" $archetype }}
{{- if not (partialCached "fileExists.hugo" $f $f) }} {{- if not (partialCached "fileExists.hugo" $f $f) }}