diff options
| author | Eltrac <hi@guhub.cn> | 2025-05-23 09:16:32 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-05-23 09:16:32 +0800 |
| commit | a3b7096550dd7d7f143bd259383f7f3aa4f32a20 (patch) | |
| tree | cb399f05cb33b9bae49eeb1f42751901af54ca66 /layouts/posts | |
| parent | ade6601ce692307ddc1798417e8cb1647643c898 (diff) | |
feat: post endnotes
Diffstat (limited to 'layouts/posts')
| -rw-r--r-- | layouts/posts/single.html | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 00517df4..53182ef7 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -35,13 +35,20 @@ </header> <!-- Post Content --> - <div id="post-content" class="post-content markdown-body" + <div class="post-content markdown-body" style="view-transition-name: post-content-{{ .File.UniqueID }}"> {{ if .Params.toc }}{{ partial "components/toc" . }}{{ end }} {{ .Site.Params.postHeaderContent | safeHTML }} - {{ .Content }} - {{ if eq .Site.Language.Lang "zh" }} - <p style="font-size: 0.9rem">如果你觉得文章对你有帮助,可以考虑<a href="/sponsor">赞助作者</a></p> + <div id="post-content">{{ .Content }}</div> + {{ if .Params.endnotes }} + <hr> + <div id="post-endnotes"> + <ul> + {{ range .Params.endnotes }} + <li>{{ . | markdownify }}</li> + {{ end }} + </ul> + </div> {{ end }} </div> |
