update @ Sun Dec 15 14:11:46 EET 2024

Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
Arija A. 2024-12-15 14:11:46 +02:00
parent 84c9c43cab
commit 33951e2092
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

@ -190,6 +190,7 @@ HTML_BEGIN: typing.Final[
<meta name="theme-color" content="{theme_primary}" />
<link rel="manifest" href="/manifest.json" />
<link rel="canonical" href="{blog}/{path}">
<link rel="og:url" href="{blog}/{path}">
<style type="text/css">
:root{{color-scheme:{theme_type};--b:{theme_primary};--f:{theme_secondary}}}\
html{{background-color:var(--b);color:var(--f)}}{critical_css}
@ -220,15 +221,18 @@ html{{background-color:var(--b);color:var(--f)}}{critical_css}
<meta name="author" content="{author}" />
<meta name="generator" content="{gen}" />
<meta property="og:locale" content="{locale}" />
<meta name="license" content="{license}">
<link rel="sitemap" href="/sitemap.xml" type="application/xml">"""
<meta name="license" content="{license}" />
<link rel="sitemap" href="/sitemap.xml" type="application/xml" />"""
POST_TEMPLATE: typing.Final[str] = (
HTML_BEGIN
+ """
<style type="text/css">{post_critical_css}</style>
<title>{blog_title} -> {post_title}</title>
<meta property="og:title" content="{blog_title} -> {post_title}" />
<meta name="description" content="{post_title} by {author} at {post_creation_time} GMT -- {post_description}" />
<meta property="og:description" content="{post_title} by {author} at {post_creation_time} GMT -- {post_description}" />
<meta property="og:twitter" content="{post_title} by {author} at {post_creation_time} GMT -- {post_description}" />
<meta property="article:read_time" content="{post_read_time}" />
<meta property="og:type" content="article" /> {image_meta}
</head>
@ -280,7 +284,9 @@ INDEX_TEMPLATE: typing.Final[str] = (
HTML_BEGIN
+ """
<title>{blog_title}</title>
<meta property="og:title" content="{blog_title}" />
<meta name="description" content="{blog_description}" />
<meta property="og:description" content="{blog_description}" />
<meta property="og:type" content="website" />
</head>
@ -327,7 +333,9 @@ STATS_TEMPLATE: typing.Final[str] = (
HTML_BEGIN
+ """
<title>{blog_title} -> stats</title>
<meta property="og:title" content="{blog_title} -> stats" />
<meta name="description" content="stats of {blog_title}, {blog_description}" />
<meta property="og:description" content="stats of {blog_title}, {blog_description}" />
<meta property="og:type" content="website" />
</head>
@ -895,6 +903,7 @@ def keywords(post: dict[str, typing.Any]) -> int:
)
return OK
@ecmds.new
def preview(post: dict[str, typing.Any]) -> int:
"""edit preview"""
@ -1167,6 +1176,7 @@ def build(config: dict[str, typing.Any]) -> int:
if "preview" in post and post["preview"] in MEDIA_INDEX:
src: str = f"/media/{post['preview']}.{MEDIA_INDEX[post['preview']]['ext']}"
image_meta = f"""<meta property="og:image" content="{src}" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="{src}" />"""
with open(f"{post_dir}/index.html", "w") as html: