theme: make migration easier

content.html is meant to be overloaded by the user and it should just work
so every logic needs to be put somewhere else
This commit is contained in:
Sören Weber 2024-08-29 14:23:55 +02:00
parent 8692fc4988
commit 4adf99061b
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
5 changed files with 8 additions and 7 deletions
layouts

View file

@ -5,7 +5,7 @@
</header>
{{ partial "heading-pre.html" . }}{{ partial "heading.html" . }}{{ partial "heading-post.html" . }}
{{ partial "content.html" . | safeHTML }}
{{ partial "article-content.html" . }}
<footer class="footline">
{{- partial "content-footer.html" . }}
</footer>

View file

@ -6,7 +6,7 @@
{{ partial "heading-pre.html" . }}<div class="article-subheading">{{ T "Chapter" .Params.Weight }}</div>
{{ partial "heading.html" . }}{{ partial "heading-post.html" . }}
{{ partial "content.html" . | safeHTML }}
{{ partial "article-content.html" . }}
<footer class="footline">
{{- partial "content-footer.html" . }}
</footer>

View file

@ -5,7 +5,7 @@
</header>
{{ partial "heading-pre.html" . }}{{ partial "heading.html" . }}{{ partial "heading-post.html" . }}
{{ partial "content.html" . | safeHTML }}
{{ partial "article-content.html" . }}
<footer class="footline">
{{- partial "content-footer.html" . }}
</footer>

View file

@ -0,0 +1,4 @@
{{/* the following check avoids to print out content of headless bundles if called from nestedContent.gotmpl */}}
{{- if .RelPermalink }}
{{- partial "content.html" . | safeHTML }}
{{- end }}

View file

@ -1,4 +1 @@
{{- /* the following check avoids to print out content of headless bundles if called from nested-content.html */}}
{{- if partial "permalink.gotmpl" (dict "to" .) }}
{{- .Content }}
{{- end }}
{{ .Content }}