mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
Add post-content
only if it exists
This commit is contained in:
parent
162d80071f
commit
b4393b3d6e
@ -16,11 +16,13 @@
|
|||||||
</header>
|
</header>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Content }}
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
{{- if not (.Param "disableAnchoredHeadings") }}
|
{{- if not (.Param "disableAnchoredHeadings") }}
|
||||||
{{- partial "anchored_headings.html" .Content -}}
|
{{- partial "anchored_headings.html" .Content -}}
|
||||||
{{- else }}{{ .Content }}{{ end }}
|
{{- else }}{{ .Content }}{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- $pages := union .RegularPages .Sections }}
|
{{- $pages := union .RegularPages .Sections }}
|
||||||
|
|
||||||
|
@ -25,11 +25,15 @@
|
|||||||
{{- if (.Param "ShowToc") }}
|
{{- if (.Param "ShowToc") }}
|
||||||
{{- partial "toc.html" . }}
|
{{- partial "toc.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Content }}
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
{{- if not (.Param "disableAnchoredHeadings") }}
|
{{- if not (.Param "disableAnchoredHeadings") }}
|
||||||
{{- partial "anchored_headings.html" .Content -}}
|
{{- partial "anchored_headings.html" .Content -}}
|
||||||
{{- else }}{{ .Content }}{{ end }}
|
{{- else }}{{ .Content }}{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
<footer class="post-footer">
|
<footer class="post-footer">
|
||||||
{{- if .Params.tags }}
|
{{- if .Params.tags }}
|
||||||
<ul class="post-tags">
|
<ul class="post-tags">
|
||||||
|
Loading…
Reference in New Issue
Block a user