diff options
| author | Eltrac <hi@guhub.cn> | 2025-04-03 14:11:51 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-04-03 14:11:51 +0800 |
| commit | 2772544294afea137e92ed095e1e5e0901426fee (patch) | |
| tree | f4336a9ced571b36f3d7dc1d7799ba39392450da /layouts/shortcodes | |
| parent | 5b17aaa86f546e12ffdaee4e1417eca020b5b565 (diff) | |
feat: add sponsor page and link
Former-commit-id: bb505f8fc86e47e277907437fd3240a58670759c
Diffstat (limited to 'layouts/shortcodes')
| -rw-r--r-- | layouts/shortcodes/postcount.html | 1 | ||||
| -rw-r--r-- | layouts/shortcodes/wordcount.html | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/layouts/shortcodes/postcount.html b/layouts/shortcodes/postcount.html new file mode 100644 index 00000000..68da6893 --- /dev/null +++ b/layouts/shortcodes/postcount.html @@ -0,0 +1 @@ +{{ len (where .Site.RegularPages "Section" "posts") }} diff --git a/layouts/shortcodes/wordcount.html b/layouts/shortcodes/wordcount.html new file mode 100644 index 00000000..3b302b82 --- /dev/null +++ b/layouts/shortcodes/wordcount.html @@ -0,0 +1,5 @@ +{{ $total := 0 }} +{{ range where .Site.RegularPages "Section" "posts" }} + {{ $total = add $total .WordCount }} +{{ end }} +{{ $total }} |
