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 18:05:39 EET 2024
Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
parent
19751d4b22
commit
b5036a3d89
2 changed files with 11 additions and 4 deletions
|
@ -57,10 +57,11 @@
|
||||||
"secondary": "#f9f6e8",
|
"secondary": "#f9f6e8",
|
||||||
"type": "dark"
|
"type": "dark"
|
||||||
},
|
},
|
||||||
|
"favicon": "https://ari.lt/favicon.ico",
|
||||||
"manifest": {
|
"manifest": {
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "/favicon.ico",
|
"src": "https://ari.lt/favicon.ico",
|
||||||
"sizes": "128x128",
|
"sizes": "128x128",
|
||||||
"type": "image/vnd.microsoft.icon"
|
"type": "image/vnd.microsoft.icon"
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,10 +90,11 @@ DEFAULT_CONFIG: dict[str, typing.Any] = {
|
||||||
"secondary": "#fff",
|
"secondary": "#fff",
|
||||||
"type": "dark",
|
"type": "dark",
|
||||||
},
|
},
|
||||||
|
"favicon": "https://ari.lt/favicon.ico",
|
||||||
"manifest": {
|
"manifest": {
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "/favicon.ico",
|
"src": "https://ari.lt/favicon.ico",
|
||||||
"sizes": "128x128",
|
"sizes": "128x128",
|
||||||
"type": "image/vnd.microsoft.icon",
|
"type": "image/vnd.microsoft.icon",
|
||||||
},
|
},
|
||||||
|
@ -181,7 +182,7 @@ HTML_BEGIN: typing.Final[
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="icon" href="{blog}/favicon.ico" sizes="128x128" type="image/vnd.microsoft.icon" />
|
<link rel="icon" href="{favicon}" sizes="128x128" type="image/vnd.microsoft.icon" />
|
||||||
<meta
|
<meta
|
||||||
name="keywords"
|
name="keywords"
|
||||||
content="{keywords}"
|
content="{keywords}"
|
||||||
|
@ -1192,7 +1193,9 @@ def build(config: dict[str, typing.Any]) -> int:
|
||||||
|
|
||||||
image_meta: str = ""
|
image_meta: str = ""
|
||||||
if "preview" in post and post["preview"] in MEDIA_INDEX:
|
if "preview" in post and post["preview"] in MEDIA_INDEX:
|
||||||
src: str = f"{config['blog']}/media/{post['preview']}.{MEDIA_INDEX[post['preview']]['ext']}"
|
src: str = (
|
||||||
|
f"{config['blog']}/media/{post['preview']}.{MEDIA_INDEX[post['preview']]['ext']}"
|
||||||
|
)
|
||||||
|
|
||||||
image_meta = f"""<meta property="og:image" content="{src}" />
|
image_meta = f"""<meta property="og:image" content="{src}" />
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
|
@ -1203,6 +1206,7 @@ def build(config: dict[str, typing.Any]) -> int:
|
||||||
web_mini.html.minify_html(
|
web_mini.html.minify_html(
|
||||||
POST_TEMPLATE.format(
|
POST_TEMPLATE.format(
|
||||||
lang=lang,
|
lang=lang,
|
||||||
|
favicon=config["favicon"],
|
||||||
keywords=html_escape(
|
keywords=html_escape(
|
||||||
", ".join(
|
", ".join(
|
||||||
set(post["keywords"] + config["default-keywords"])
|
set(post["keywords"] + config["default-keywords"])
|
||||||
|
@ -1261,6 +1265,7 @@ def build(config: dict[str, typing.Any]) -> int:
|
||||||
web_mini.html.minify_html(
|
web_mini.html.minify_html(
|
||||||
INDEX_TEMPLATE.format( # type: ignore
|
INDEX_TEMPLATE.format( # type: ignore
|
||||||
lang=lang,
|
lang=lang,
|
||||||
|
favicon=config["favicon"],
|
||||||
keywords=(bkw := html_escape(", ".join(config["blog-keywords"]))),
|
keywords=(bkw := html_escape(", ".join(config["blog-keywords"]))),
|
||||||
theme_type=config["theme"]["type"],
|
theme_type=config["theme"]["type"],
|
||||||
theme_primary=config["theme"]["primary"],
|
theme_primary=config["theme"]["primary"],
|
||||||
|
@ -1322,6 +1327,7 @@ def build(config: dict[str, typing.Any]) -> int:
|
||||||
web_mini.html.minify_html(
|
web_mini.html.minify_html(
|
||||||
STATS_TEMPLATE.format(
|
STATS_TEMPLATE.format(
|
||||||
lang=lang,
|
lang=lang,
|
||||||
|
favicon=config["favicon"],
|
||||||
keywords=bkw + ", stats, statistics",
|
keywords=bkw + ", stats, statistics",
|
||||||
theme_type=config["theme"]["type"],
|
theme_type=config["theme"]["type"],
|
||||||
theme_primary=config["theme"]["primary"],
|
theme_primary=config["theme"]["primary"],
|
||||||
|
|
Loading…
Add table
Reference in a new issue