Feat: open more custom blocks for posts page

This commit is contained in:
Cell
2024-12-27 15:38:12 +08:00
parent 469af95f10
commit 30a67c4b52
5 changed files with 46 additions and 2 deletions
+12
View File
@@ -159,6 +159,9 @@
</div>
{{- end -}}
{{- /* Custom block before post content */ -}}
{{- block "custom-post__content:before" . }}{{ end -}}
{{- /* Content */ -}}
{{- $content := dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
<div class="content" id="content"{{ with $params.endFlag }} data-end-flag="{{ . }}"{{ end }}>
@@ -169,6 +172,9 @@
{{- end -}}
</div>
{{- /* Custom block after post content */ -}}
{{- block "custom-post__content:after" . }}{{ end -}}
{{- /* Related Content */ -}}
{{- partial "single/related.html" . -}}
@@ -203,6 +209,9 @@
</article>
<aside class="toc" id="toc-auto" aria-label="{{ T "single.contents" }}">
{{- /* Custom block before post toc */ -}}
{{- block "custom-post__toc:before" . }}{{ end -}}
{{- /* Auto TOC */ -}}
{{- if $showToc -}}
<h2 class="toc-title{{ with $params.password }} encrypted-hidden{{ end }}">
@@ -211,5 +220,8 @@
</h2>
<div class="toc-content{{ if eq $toc.auto false }} always-active{{ end }}{{ with $params.password }} encrypted-hidden{{ end }}" id="toc-content-auto"></div>
{{- end -}}
{{- /* Custom block after post toc */ -}}
{{- block "custom-post__toc:after" . }}{{ end -}}
</aside>
{{- end -}}