diff --git a/.gitignore b/.gitignore
index 4358135..184abe7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,5 @@ venv/
/recents_json_hash.txt
/recents.json
/rss.xml
+/sitemap.xml
+/robots.txt
diff --git a/content/critical.css b/content/critical.css
index 06abce2..88da325 100644
--- a/content/critical.css
+++ b/content/critical.css
@@ -1,8 +1,8 @@
:root {
- --clr-blockquote-bg: #ede9d3;
- --blockquote-width: 2px;
+ --bq-b: #ede9d3;
+ --bqw: 2px;
- --clr-link: #cdc4c4; /* #9e9b9b; */
+ --a-f: #cdc4c4; /* #9e9b9b; */
}
*,
@@ -43,7 +43,7 @@ li {
a {
text-decoration: none;
font-style: italic;
- color: var(--clr-link);
+ color: var(--a-f);
}
*[h] > a {
diff --git a/content/post_critical.css b/content/post_critical.css
index 63568f5..72c4afe 100644
--- a/content/post_critical.css
+++ b/content/post_critical.css
@@ -8,7 +8,7 @@ blockquote {
blockquote:before {
content: "";
- border-left: var(--blockquote-width) solid var(--clr-blockquote-bg); /* Thx cel */
+ border-left: var(--bqw) solid var(--bq-b); /* Thx cel */
position: absolute;
bottom: 14px;
top: 13px;
diff --git a/content/styles.css b/content/styles.css
index ddd2cd6..df3f7d9 100644
--- a/content/styles.css
+++ b/content/styles.css
@@ -1,13 +1,13 @@
@import url(/content/fonts/Hack.min.css);
:root {
- --clr-blockquote-fg: #e6e0c8;
+ --bq-f: #e6e0c8;
- --clr-code-bg: #1f1b1a;
- --clr-code-fg: #f0f3e6;
- --clr-code-bg-dark: #181414;
+ --cd-b: #1f1b1a;
+ --cd-f: #f0f3e6;
+ --cd-bd: #181414;
- --scrollbar-height: 6px; /* TODO Firefox */
+ --scrlh: 6px; /* TODO Firefox */
}
*,
@@ -18,7 +18,7 @@
scrollbar-width: none;
-ms-overflow-style: none;
- scrollbar-color: var(--clr-code-bg-dark) transparent;
+ scrollbar-color: var(--cd-bd) transparent;
scroll-behavior: smooth;
@@ -27,7 +27,7 @@
::-webkit-scrollbar,
::-webkit-scrollbar-thumb {
- height: var(--scrollbar-height);
+ height: var(--scrlh);
}
::-webkit-scrollbar {
@@ -35,7 +35,7 @@
}
::-webkit-scrollbar-thumb {
- background-color: var(--clr-code-bg-dark);
+ background-color: var(--cd-bd);
}
html::-webkit-scrollbar,
@@ -50,23 +50,23 @@ a:hover {
pre,
pre * {
- background-color: var(--clr-code-bg);
+ background-color: var(--cd-b);
}
pre,
pre *,
code {
- color: var(--clr-code-fg);
+ color: var(--cd-f);
}
code:not(pre code),
time {
- background-color: var(--clr-code-bg);
+ background-color: var(--cd-b);
}
blockquote,
blockquote * {
- color: var(--clr-blockquote-fg);
+ color: var(--bq-f);
}
*[h]:hover > a,
@@ -107,20 +107,20 @@ blockquote * {
@media (prefers-contrast: more) {
:root {
- --clr-bg: #000000;
- --clr-fg: #ffffff;
+ --b: #000;
+ --f: #fff;
- --clr-blockquote-fg: #ededed;
- --clr-blockquote-bg: #868e91;
+ --bq-f: #ededed;
+ --bq-b: #868e91;
- --clr-code-bg: #090909;
- --clr-code-fg: #f0f0f0;
+ --cd-b: #090909;
+ --cd-f: #f0f0f0;
- --clr-link: #a9c4d1;
+ --a-f: #a9c4d1;
- --blockquote-width: 4px;
+ --bqw: 4px;
- --scrollbar-height: initial; /* TODO: Firefox */
+ --scrlh: initial; /* TODO: Firefox */
}
html::-webkit-scrollbar {
diff --git a/requirements.txt b/requirements.txt
index d6c8521..7d31997 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-css-html-js-minify
+web-mini
mistune
typing
readtime
diff --git a/robots.txt b/robots.txt
deleted file mode 100644
index 763ef43..0000000
--- a/robots.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-User-agent: *
-Disallow: /content/*
-Allow: *
-Sitemap: https://blog.ari-web.xyz/sitemap.xml
\ No newline at end of file
diff --git a/scripts/blog.py b/scripts/blog.py
index 4934e19..54c9bcb 100755
--- a/scripts/blog.py
+++ b/scripts/blog.py
@@ -29,8 +29,7 @@ import mistune.core
import mistune.inline_parser
import mistune.plugins
import unidecode
-from css_html_js_minify import html_minify # type: ignore
-from css_html_js_minify import process_single_css_file # type: ignore
+import web_mini
from readtime import of_markdown as read_time_of_markdown # type: ignore
__version__: typing.Final[int] = 2
@@ -173,8 +172,8 @@ HTML_BEGIN: typing.Final[
str:
return ""
+def min_css_file(file: str, out: str) -> None:
+ with open(file, "r") as icss:
+ with open(out, "w") as ocss:
+ ocss.write(web_mini.css.minify_css(icss.read()))
+
+
# markdown
TITLE_LINKS_RE: typing.Final[str] = r"<#:[^>]+?>"
@@ -844,6 +849,10 @@ def rm(config: dict[str, typing.Any]) -> int:
def build(config: dict[str, typing.Any]) -> int:
"""build blog posts"""
+ log("compiling regex")
+
+ web_mini.html.html_fns.compileall()
+
log("setting up posts directory")
if os.path.exists(config["posts-dir"]):
@@ -865,11 +874,11 @@ def build(config: dict[str, typing.Any]) -> int:
if os.path.isfile(critp := f"{config['assets-dir']}/critical.css"):
with open(critp, "r") as fp:
- crit_css = fp.read()
+ crit_css = web_mini.css.minify_css(fp.read())
if os.path.isfile(critp := f"{config['assets-dir']}/post_critical.css"):
with open(critp, "r") as fp:
- post_crit_css = fp.read()
+ post_crit_css = web_mini.css.minify_css(fp.read())
def build_post(slug: str, post: dict[str, typing.Any]) -> None:
ct: float = ctimer()
@@ -879,7 +888,7 @@ def build(config: dict[str, typing.Any]) -> int:
with open(f"{post_dir}/index.html", "w") as html:
html.write(
- html_minify(
+ web_mini.html.minify_html(
POST_TEMPLATE.format(
lang=lang,
keywords=html_escape(
@@ -936,7 +945,7 @@ def build(config: dict[str, typing.Any]) -> int:
with open("index.html", "w") as index:
index.write(
- html_minify(
+ web_mini.html.minify_html(
INDEX_TEMPLATE.format( # type: ignore
lang=lang,
keywords=html_escape(", ".join(config["blog-keywords"])),
@@ -987,6 +996,9 @@ def css(config: dict[str, typing.Any]) -> int:
t: Thread
ts: list[Thread] = []
+ log("compiling regex")
+ web_mini.css.css_fns.compileall()
+
def _thread(c: typing.Callable[..., typing.Any], *args: str) -> None:
def _c() -> None:
ct: float = ctimer()
@@ -998,7 +1010,7 @@ def css(config: dict[str, typing.Any]) -> int:
if os.path.isfile(styles := f"{config['assets-dir']}/styles.css"):
lnew(f"minifying {styles!r}")
- _thread(process_single_css_file, styles, f"{config['assets-dir']}/styles.min.css") # type: ignore
+ _thread(min_css_file, styles, f"{config['assets-dir']}/styles.min.css") # type: ignore
if os.path.isdir(fonts := f"{config['assets-dir']}/fonts"):
log(f"minifying fonts in {fonts!r}")
@@ -1007,7 +1019,7 @@ def css(config: dict[str, typing.Any]) -> int:
if fcss.endswith(".min.css"):
continue
- _thread(process_single_css_file, fcss, f"{os.path.splitext(fcss)[0]}.min.css") # type: ignore
+ _thread(min_css_file, fcss, f"{os.path.splitext(fcss)[0]}.min.css") # type: ignore
for t in ts:
t.join()
diff --git a/sitemap.xml b/sitemap.xml
deleted file mode 100644
index 80f5e28..0000000
--- a/sitemap.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-https://ari-web.xyz2023-10-07T19:40:49+00:001.0https://blog.ari-web.xyz2023-10-07T19:40:49+00:001.0https://blog.ari-web.xyz/rss.xml2023-10-07T19:40:49+00:001.0https://blog.ari-web.xyz/b/leaking-windows-11-home-key2023-10-01T20:18:35+00:001.0https://blog.ari-web.xyz/b/linux2023-09-13T18:21:38+00:001.0https://blog.ari-web.xyz/b/omg-pls-stop2023-09-06T07:57:03+00:001.0https://blog.ari-web.xyz/b/blogging-system-rewrite-again-32023-08-29T04:26:53+00:001.0https://blog.ari-web.xyz/b/install-lineageos-root-ur-xiomi-redmi-8-phone-using-magisk2023-09-07T10:55:41+00:001.0https://blog.ari-web.xyz/b/doml-7-2023-08-232023-08-23T01:13:50+00:001.0https://blog.ari-web.xyz/b/vegan-dumplings-recipe-ig-lol2023-08-10T14:52:30+00:001.0https://blog.ari-web.xyz/b/happy-1000-days-ari-web2023-07-17T15:19:50+00:001.0https://blog.ari-web.xyz/b/doml-6-2023-06-272023-06-26T21:47:14+00:001.0https://blog.ari-web.xyz/b/transgender2023-05-23T18:29:32+00:001.0https://blog.ari-web.xyz/b/schrödingers-crush2023-05-17T18:09:30+00:001.0https://blog.ari-web.xyz/b/feel-cool-reported-bug-company-got-paid-1002023-05-07T19:42:19+00:001.0https://blog.ari-web.xyz/b/doml-5-2023-05-062023-05-06T15:31:04+00:001.0https://blog.ari-web.xyz/b/george-orwell-19842023-05-02T14:24:49+00:001.0https://blog.ari-web.xyz/b/transphobia2023-04-27T19:23:32+00:001.0https://blog.ari-web.xyz/b/corporate-marionettes2023-04-25T23:23:36+00:001.0https://blog.ari-web.xyz/b/torturetric-system2023-04-13T20:30:47+00:001.0https://blog.ari-web.xyz/b/userari-webxyz-situation2023-04-09T22:39:50+00:001.0https://blog.ari-web.xyz/b/serverari-webxyz-going-be-changed2023-04-09T12:51:08+00:001.0https://blog.ari-web.xyz/b/doml-4-2023-04-072023-04-07T14:19:25+00:001.0https://blog.ari-web.xyz/b/ari-web-index-redesign2023-04-05T23:01:24+00:001.0https://blog.ari-web.xyz/b/ari-web-blog-api-change2023-04-04T19:29:02+00:001.0https://blog.ari-web.xyz/b/twitter2023-04-01T22:14:40+00:001.0https://blog.ari-web.xyz/b/ari-web-server-https-serverari-webxyz2023-03-25T21:44:59+00:001.0https://blog.ari-web.xyz/b/ghosts2023-03-17T22:33:40+00:001.0https://blog.ari-web.xyz/b/close-door-beginner-friendly-lecture-parents2023-03-09T17:02:20+00:001.0https://blog.ari-web.xyz/b/bash-syntax-highlighting-part-one-concept2023-03-05T13:59:54+00:001.0https://blog.ari-web.xyz/b/doml-3-2023-03-012023-03-01T19:46:23+00:001.0https://blog.ari-web.xyz/b/low-calorie-vegetarian-bean-soup2023-02-04T20:17:20+00:001.0https://blog.ari-web.xyz/b/doml-2-2023-02-022023-02-02T13:57:28+00:001.0https://blog.ari-web.xyz/b/i-came-out-to-my-psychologist-an-update2023-01-30T13:06:52+00:001.0https://blog.ari-web.xyz/b/doml-1-2023-01-292023-01-29T02:11:39+00:001.0https://blog.ari-web.xyz/b/how-does-it-feel-to-be-a-lab-rat2023-01-21T20:50:23+00:001.0https://blog.ari-web.xyz/b/chatgpt-fun2023-01-19T20:07:23+00:001.0https://blog.ari-web.xyz/b/i-came-out-to-my-psychologist2023-01-16T18:06:33+00:001.0https://blog.ari-web.xyz/b/netlify-tos-terms-of-service-tldr2022-12-25T21:45:27+00:001.0https://blog.ari-web.xyz/b/idk-something2022-12-25T02:11:02+00:001.0https://blog.ari-web.xyz/b/pievos-dūno-upė-lyrics-pievos-dūno-upė-žodžiai2022-12-03T01:10:55+00:001.0https://blog.ari-web.xyz/b/advent-of-code-20222022-11-28T16:18:41+00:001.0https://blog.ari-web.xyz/b/comparison-between-the-oh-my-bash-and-baz-plugin-managers-for-gnu-bash2022-11-18T00:14:19+00:001.0https://blog.ari-web.xyz/b/gnu-bash-script-and-general-code-optimisation-tips2022-11-01T01:13:10+00:001.0https://blog.ari-web.xyz/b/how-to-make-your-first-website2022-10-30T17:46:21+00:001.0https://blog.ari-web.xyz/b/minimal-software-i-made-for-linux-systems2022-10-29T20:15:22+00:001.0https://blog.ari-web.xyz/b/-thinkpeach--not--thinkpink2022-10-27T13:56:03+00:001.0https://blog.ari-web.xyz/b/leaking-your-ip-is-not-dangerous--please-stop-being-so-stupid2022-10-21T16:44:16+00:001.0https://blog.ari-web.xyz/b/contact-me2022-10-20T17:23:12+00:001.0https://blog.ari-web.xyz/b/working-with-paths-in-c2022-10-16T22:46:15+00:001.0https://blog.ari-web.xyz/b/happy-2nd-birthday--ari-web2022-10-16T22:03:39+00:001.0https://blog.ari-web.xyz/b/ari-web-blog-hyperlink-redesign2023-09-07T10:10:42+00:001.0https://blog.ari-web.xyz/b/my-view-on-death2022-10-02T01:32:14+00:001.0https://blog.ari-web.xyz/b/how-to-generate-a-report-for-songs-you-listen-to-using-mpv2022-09-29T03:36:15+00:001.0https://blog.ari-web.xyz/b/fuck-you--putin--you-little-bitch2022-09-26T16:05:26+00:001.0https://blog.ari-web.xyz/b/the--www--subdomain-is-no-longer-the-default-for-ari-web-xyz2022-09-25T02:21:29+00:001.0https://blog.ari-web.xyz/b/ari-web-now-delivers-minified-content2022-09-25T01:32:15+00:001.0https://blog.ari-web.xyz/b/ari-web-apis--how-to-use-them2022-09-22T22:58:42+00:001.0https://blog.ari-web.xyz/b/ari-web-apis-are-going-public2022-09-22T22:04:18+00:001.0https://blog.ari-web.xyz/b/how-to-make-your-own-gentoo-linux-overlay2022-09-22T18:44:29+00:001.0https://blog.ari-web.xyz/b/ari-web-browser-compatibility2022-09-20T01:21:45+00:001.0https://blog.ari-web.xyz/b/how-to-fix-contant-freezing-or-disconnecting-of-wpa-supplicant-wifi-on-rtl8821ce2022-09-19T18:59:08+00:001.0https://blog.ari-web.xyz/b/my-music-artist-recommendations2022-09-17T20:10:01+00:001.0https://blog.ari-web.xyz/b/sorry-for-deleting-some-blog-posts2022-09-08T13:36:50+00:001.0https://blog.ari-web.xyz/b/homework---ish-have-to-present-some-stuff-about-my-projects-and-things2022-09-08T13:21:05+00:001.0https://blog.ari-web.xyz/b/the-best-temperature-system----degrees-torture--t°-2022-09-02T16:38:46+00:001.0https://blog.ari-web.xyz/b/how-to-manually-install-alpine-linux-on-any-linux-distribution2022-08-18T22:37:59+00:001.0https://blog.ari-web.xyz/b/repl-it-billing-documentation-slightly-improved2022-08-15T23:27:27+00:001.0https://blog.ari-web.xyz/b/stop-trying-to-replace-c--2022-08-09T23:46:44+00:001.0https://blog.ari-web.xyz/b/simplicity-is-not-ease2022-08-09T22:58:56+00:001.0https://blog.ari-web.xyz/b/experiments2022-08-09T02:11:45+00:001.0https://blog.ari-web.xyz/b/discord-is-a-pure-shithole--shitcord2022-08-08T21:51:31+00:001.0https://blog.ari-web.xyz/b/i-m-leaving-collabvm2022-08-02T21:55:40+00:001.0https://blog.ari-web.xyz/b/modernism2022-07-31T18:19:27+00:001.0https://blog.ari-web.xyz/b/-aš-už-tradicinę-šeimą--movement-in-lithuania2022-07-11T19:07:50+00:001.0https://blog.ari-web.xyz/b/abot--ari-bot--bot-on-collabvm2022-07-08T03:00:16+00:001.0https://blog.ari-web.xyz/b/how-i-feel-about-rust-being-added-to-linux-kernel-version-5-202022-07-01T15:43:13+00:001.0https://blog.ari-web.xyz/b/goodbye--technoblade---2022-07-01T01:45:59+00:001.0https://blog.ari-web.xyz/b/salad-fingers2022-06-28T15:16:18+00:001.0https://blog.ari-web.xyz/b/what-kind-of-pedophilic-bullshit-is-this--freespeechtube-2022-06-28T14:36:55+00:001.0https://blog.ari-web.xyz/b/me--an-lgbt-person---anti-lgbt-family---no2022-06-28T12:46:42+00:001.0https://blog.ari-web.xyz/b/fasm----the-almost-perfect-assembler2022-06-26T02:28:39+00:001.0https://blog.ari-web.xyz/b/fuck-smokers2022-06-25T10:24:19+00:001.0https://blog.ari-web.xyz/b/restricting-contributions-on-ari-web2022-06-22T13:40:54+00:001.0https://blog.ari-web.xyz/b/being-lgbt-in-lithuania--my-expierience2022-06-16T09:58:14+00:001.0https://blog.ari-web.xyz/b/accesibility-issues-of-ari-web2022-06-14T22:28:46+00:001.0https://blog.ari-web.xyz/b/important--impersonation-of-me-on-the-internet2022-06-08T19:29:15+00:001.0https://blog.ari-web.xyz/b/stop-caring-about-the-looks2022-06-07T18:17:43+00:001.0https://blog.ari-web.xyz/b/weird-ass-day2022-06-06T18:14:39+00:001.0https://blog.ari-web.xyz/b/my-enneagram-type2022-06-05T15:44:22+00:001.0https://blog.ari-web.xyz/b/my-personality-type2022-06-05T14:54:58+00:001.0https://blog.ari-web.xyz/b/-duckduckgo--more-like-duckduckno--blog-proven2022-06-04T11:28:59+00:001.0https://blog.ari-web.xyz/b/i-got-outted-by-my-classmate--on-pride-month--fun2022-06-01T11:59:04+00:001.0https://blog.ari-web.xyz/b/pride-month-just-started-and-i-m-already-in-pain2022-06-01T10:37:56+00:001.0https://blog.ari-web.xyz/b/wtf-is-going-on-and-why-is-my-site-blowing-up2022-05-30T16:15:09+00:001.0https://blog.ari-web.xyz/b/happy--almost--pride-month---2022-05-30T12:19:42+00:001.0https://blog.ari-web.xyz/b/introducing-the-ari-web-api-2022-05-26T22:08:32+00:001.0https://blog.ari-web.xyz/b/user-opinion-and-comments-site-is-now-up---2022-05-26T19:01:41+00:001.0https://blog.ari-web.xyz/b/my-gentoo-linux-setup2022-05-25T17:15:02+00:001.0https://blog.ari-web.xyz/b/is-assembly-bloated-2022-05-21T15:25:01+00:001.0https://blog.ari-web.xyz/b/shutdown-of-my-tcl--tiny-core-linux--mirror2022-05-20T20:04:57+00:001.0https://blog.ari-web.xyz/b/how-to-print-coloured-text-in-c-and-c--2022-05-08T20:17:23+00:001.0https://blog.ari-web.xyz/b/happy-pi-e--day2022-03-14T21:02:43+00:001.0https://blog.ari-web.xyz/b/new-blog-management-system-2022-03-11T11:09:16+00:001.0
\ No newline at end of file