diff --git a/i18n/en.toml b/i18n/en.toml index 5b4202eff..a5f687d77 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -218,6 +218,9 @@ other = "Series" [settings] other = "Settings" +[stats] +other = "Stats" + [table_of_contents] other = "Contents" diff --git a/i18n/zh-cn.toml b/i18n/zh-cn.toml index edb554587..3066688cb 100644 --- a/i18n/zh-cn.toml +++ b/i18n/zh-cn.toml @@ -205,6 +205,9 @@ other = "专栏" [settings] other = "设置" +[stats] +other = "统计" + [table_of_contents] other = "目录" diff --git a/i18n/zh-hans.toml b/i18n/zh-hans.toml index edb554587..3066688cb 100644 --- a/i18n/zh-hans.toml +++ b/i18n/zh-hans.toml @@ -205,6 +205,9 @@ other = "专栏" [settings] other = "设置" +[stats] +other = "统计" + [table_of_contents] other = "目录" diff --git a/i18n/zh-hant.toml b/i18n/zh-hant.toml index 4091b6287..8badcac6f 100644 --- a/i18n/zh-hant.toml +++ b/i18n/zh-hant.toml @@ -205,6 +205,9 @@ other = "專欄" [settings] other = "設置" +[stats] +other = "統計" + [table_of_contents] other = "目錄" diff --git a/i18n/zh-hk.toml b/i18n/zh-hk.toml index 8420b932b..790575d14 100644 --- a/i18n/zh-hk.toml +++ b/i18n/zh-hk.toml @@ -205,6 +205,9 @@ other = "專欄" [settings] other = "設置" +[stats] +other = "統計" + [table_of_contents] other = "目錄" diff --git a/i18n/zh-tw.toml b/i18n/zh-tw.toml index 4091b6287..8badcac6f 100644 --- a/i18n/zh-tw.toml +++ b/i18n/zh-tw.toml @@ -205,6 +205,9 @@ other = "專欄" [settings] other = "設置" +[stats] +other = "統計" + [table_of_contents] other = "目錄" diff --git a/layouts/partials/search/sidebar.html b/layouts/partials/search/sidebar.html index 9339b27c3..e7f073236 100644 --- a/layouts/partials/search/sidebar.html +++ b/layouts/partials/search/sidebar.html @@ -1,4 +1,5 @@
{{- partial "hooks/search/sidebar-begin" . }} + {{- partial "sidebar/stats" . }} {{- partial "hooks/search/sidebar-end" . }}
\ No newline at end of file diff --git a/layouts/partials/sidebar/stats.html b/layouts/partials/sidebar/stats.html new file mode 100644 index 000000000..c0a86b964 --- /dev/null +++ b/layouts/partials/sidebar/stats.html @@ -0,0 +1,29 @@ +{{- $icons := dict + "authors" "user" + "tags" "tags" + "series" "columns" + "categories" "folder" +}} +
+
+ +
+
+ + + {{ len $.Site.RegularPages }} + + {{- range $key, $value := $.Site.Taxonomies }} + + + {{ len $value.ByCount }} + + {{- end }} +
+
+
+