diff --git a/.gitignore b/.gitignore
index 184abe7..38afcb9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@ venv/
/rss.xml
/sitemap.xml
/robots.txt
+/stats/
diff --git a/blog.json b/blog.json
index f3abb3b..9d90767 100644
--- a/blog.json
+++ b/blog.json
@@ -46,7 +46,7 @@
"website": "https://ari-web.xyz",
"blog": "https://blog.ari-web.xyz",
"source": "/git",
- "visitor-count": "https://server.ari-web.xyz/visit",
+ "visitor-count": "/visit",
"comment": "/c",
"theme": {
"primary": "#262220",
@@ -124,6 +124,8 @@
"server-port": 8080,
"post-preview-size": 196,
"read-wpm": 150,
+ "top-words": 64,
+ "top-tags": 64,
"posts": {
"bluey": {
"title": "bluey",
diff --git a/scripts/blog.py b/scripts/blog.py
index fa2a3eb..d8e5687 100755
--- a/scripts/blog.py
+++ b/scripts/blog.py
@@ -16,6 +16,7 @@ import sys
import tempfile
import typing
import xml.etree.ElementTree as etree
+from collections import Counter
from glob import iglob
from html import escape as html_escape
from threading import Thread
@@ -29,6 +30,7 @@ import mistune.plugins
import unidecode
import web_mini
from readtime import of_markdown as read_time_of_markdown # type: ignore
+from readtime.result import Result as MarkdownResult # type: ignore
__version__: typing.Final[int] = 2
GEN: typing.Final[str] = f"ari-web blog generator version {__version__}"
@@ -137,6 +139,8 @@ DEFAULT_CONFIG: dict[str, typing.Any] = {
"server-port": 8080,
"post-preview-size": 196,
"read-wpm": 150,
+ "top-words": 64,
+ "top-tags": 64,
"posts": {},
}
@@ -238,6 +242,9 @@ POST_TEMPLATE: typing.Final[str] = (
home
|
+ stats
+ |
+
comment
|
@@ -286,6 +293,9 @@ INDEX_TEMPLATE: typing.Final[str] = (
/>
+ stats
+ |
+
comment
|
@@ -308,6 +318,109 @@ INDEX_TEMPLATE: typing.Final[str] = (