mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 10:50:24 +00:00
theme: make migration easier #891
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:
parent
8692fc4988
commit
4adf99061b
5 changed files with 8 additions and 7 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
4
layouts/partials/article-content.html
Normal file
4
layouts/partials/article-content.html
Normal 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 }}
|
|
@ -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 }}
|
Loading…
Reference in a new issue