mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
theme: run hugo demo site without warning #736
This commit is contained in:
parent
9227dfd41f
commit
dfba891622
1 changed files with 8 additions and 2 deletions
|
@ -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) }}
|
||||||
|
|
Loading…
Reference in a new issue