mirror of
https://git.ari.lt/ari.lt/blog.ari.lt.git
synced 2025-02-04 17:49:24 +01:00
update @ Wed 26 Apr 02:52:55 EEST 2023
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
652983c024
commit
4bdfb61620
1 changed files with 6 additions and 2 deletions
|
@ -187,6 +187,7 @@ BLOG_HTML_TEMPLATE: str = f"""<!DOCTYPE html>
|
||||||
|
|
||||||
<meta name="description" content="{{blog_description}}"/>
|
<meta name="description" content="{{blog_description}}"/>
|
||||||
<meta property="og:type" content="article"/>
|
<meta property="og:type" content="article"/>
|
||||||
|
<meta property="article:read_time" content="{{read_time}}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main id="blog-content">
|
<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"])
|
blog_title: str = html_escape(blog_meta["title"])
|
||||||
|
|
||||||
# 150 wpm is quite slow, but im compensating for people who
|
# 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
|
# who write blog posts -- like me
|
||||||
|
|
||||||
|
read_time: str
|
||||||
|
|
||||||
blog_base_html: str = markdown(
|
blog_base_html: str = markdown(
|
||||||
BLOG_MARKDOWN_TEMPLATE
|
BLOG_MARKDOWN_TEMPLATE
|
||||||
% (
|
% (
|
||||||
blog_title,
|
blog_title,
|
||||||
blog_time,
|
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["comment-url"],
|
||||||
config["base-homepage"],
|
config["base-homepage"],
|
||||||
config["git-url"],
|
config["git-url"],
|
||||||
|
@ -643,6 +646,7 @@ def build(config: Dict[str, Any]) -> Tuple[int, Dict[str, Any]]:
|
||||||
blog=blog_base_html,
|
blog=blog_base_html,
|
||||||
author=config["full-name"],
|
author=config["full-name"],
|
||||||
locale=config["locale"],
|
locale=config["locale"],
|
||||||
|
read_time=read_time, # type: ignore
|
||||||
)
|
)
|
||||||
|
|
||||||
log(f"minifying {blog_id!r} HTML", "MINIFY")
|
log(f"minifying {blog_id!r} HTML", "MINIFY")
|
||||||
|
|
Loading…
Add table
Reference in a new issue