update @ Wed 26 Apr 02:52:55 EEST 2023

Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
Ari Archer 2023-04-26 02:52:55 +03:00
parent 652983c024
commit 4bdfb61620
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: A50D5B4B599AF8A2

View file

@ -187,6 +187,7 @@ BLOG_HTML_TEMPLATE: str = f"""<!DOCTYPE html>
<meta name="description" content="{{blog_description}}"/>
<meta property="og:type" content="article"/>
<meta property="article:read_time" content="{{read_time}}">
</head>
<body>
<main id="blog-content">
@ -606,15 +607,17 @@ def build(config: Dict[str, Any]) -> Tuple[int, Dict[str, Any]]:
blog_title: str = html_escape(blog_meta["title"])
# 150 wpm is quite slow, but im compensating for people who
# cant read that fast, especially with unprofessional people
# cant read that fast, especially with writing style of unprofessional people
# who write blog posts -- like me
read_time: str
blog_base_html: str = markdown(
BLOG_MARKDOWN_TEMPLATE
% (
blog_title,
blog_time,
read_time_of_markdown(blog_meta["content"], 150).text, # type: ignore
(read_time := read_time_of_markdown(blog_meta["content"], 150).text), # type: ignore
config["comment-url"],
config["base-homepage"],
config["git-url"],
@ -643,6 +646,7 @@ def build(config: Dict[str, Any]) -> Tuple[int, Dict[str, Any]]:
blog=blog_base_html,
author=config["full-name"],
locale=config["locale"],
read_time=read_time, # type: ignore
)
log(f"minifying {blog_id!r} HTML", "MINIFY")