From 3dc9262d4d543adffbd61e4ac9cf46cd6904930a Mon Sep 17 00:00:00 2001 From: Eltrac Date: Fri, 23 May 2025 20:15:42 +0800 Subject: feat: add page counts to stats page Former-commit-id: 033fa8ccc68db2bbe3456de7a93848c14e611d68 --- layouts/_default/stats.html | 64 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'layouts/_default') diff --git a/layouts/_default/stats.html b/layouts/_default/stats.html index efa9821e..27c2af6f 100644 --- a/layouts/_default/stats.html +++ b/layouts/_default/stats.html @@ -43,6 +43,30 @@ bottom: 0; z-index: -1; } + + .site-stats-table { + width: 100%; + max-width: 700px; + border-collapse: collapse; + margin-bottom: 1.5rem; + } + .site-stats-table td { + padding: 0.5rem; + text-align: left; + } + .site-stats-table td:nth-child(2n) { + text-align: right; + } + .number-pill { + text-align: center; + display: inline-block; + line-height: 1.75rem; + box-sizing: border-box; + border-radius: 5px; + padding: 0 0.5rem; + background-color: var(--block-background-color); + font-size: 1rem; + }
@@ -53,6 +77,46 @@ {{ .Content }} +
+

站点统计

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
页面总数{{ len .Site.RegularPages }}总字数 + + {{- $words := 0 -}} + {{- range .Site.RegularPages -}} + {{- $words = add $words .WordCount -}} + {{- end -}} + {{ $words }} + +
标签总数{{ len .Site.Taxonomies.tags }}专栏数量{{ len .Site.Taxonomies.categories }}
卡片数量{{ len (where .Site.RegularPages "Section" "cards") }}小说数量{{ len (where .Site.RegularPages "Section" "fictions") }}
书评数量{{ len (where .Site.RegularPages "Section" "library") }}精选文章数量{{ len (where .Site.RegularPages ".Params.featured" true) }}
+
+

内部链接图谱

站内各个页面之间通过超链接建立起来的联系,你可以通过视觉化的双向链接逛逛我的博客。图谱可以缩放和拖拽,你也可以点击这里全屏浏览。

-- cgit v1.2.3