summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-06-06 14:58:30 +0800
committerEltrac <hi@guhub.cn>2025-06-06 14:58:30 +0800
commitb814d71d0572e80b792789d95c80a5e5ed443a79 (patch)
treee662b60880d4848f36c668cfabc03af04cf9dd35
parented5fe0848d18665cd3fbd6011876207b2fee61e4 (diff)
refactor: move word count chart to stats page
-rw-r--r--layouts/_default/section.html1
-rw-r--r--layouts/_default/stats.html3
-rw-r--r--layouts/partials/components/word-count-chart.html (renamed from layouts/partials/components/wordCountChart.html)0
3 files changed, 3 insertions, 1 deletions
diff --git a/layouts/_default/section.html b/layouts/_default/section.html
index d1ad5401..c725fcaa 100644
--- a/layouts/_default/section.html
+++ b/layouts/_default/section.html
@@ -2,7 +2,6 @@
<article class="posts">
{{ partial "header.html" . }}
<div id="posts-archive" class="posts-list">
- {{ partial "components/wordCountChart.html" . }}
<!-- Post Archive List -->
{{ $first := true }} <!-- 在循环外定义一次 $first 变量 -->
{{ range (where site.RegularPages "Type" "eq" "posts").GroupByDate "2006" -}}
diff --git a/layouts/_default/stats.html b/layouts/_default/stats.html
index 07f9845f..8ca0cf47 100644
--- a/layouts/_default/stats.html
+++ b/layouts/_default/stats.html
@@ -117,6 +117,9 @@
</table>
</section>
+ <h2>每月文章字数</h2>
+ {{ partial "components/word-count-chart" . }}
+
<hr>
<section>
diff --git a/layouts/partials/components/wordCountChart.html b/layouts/partials/components/word-count-chart.html
index 65d0e986..65d0e986 100644
--- a/layouts/partials/components/wordCountChart.html
+++ b/layouts/partials/components/word-count-chart.html