mirror of
https://git.ari.lt/ari.lt/blog.ari.lt.git
synced 2025-02-04 09:39:25 +01:00
update @ Sun Dec 15 14:11:46 EET 2024
Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
parent
84c9c43cab
commit
33951e2092
1 changed files with 12 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue