From fa78d49b8d3534e457333043e87509dbc5ff8abe Mon Sep 17 00:00:00 2001 From: Ahmed Date: Thu, 18 Jun 2026 01:06:23 +0300 Subject: fix: style and diff coffee deployment --- hooks/post-receive | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'hooks') diff --git a/hooks/post-receive b/hooks/post-receive index f0418ba..d78cdf6 100644 --- a/hooks/post-receive +++ b/hooks/post-receive @@ -6,7 +6,13 @@ DEMO=/var/www/demo.gumx.cc # ── coffee.gumx.cc (personal log: DATA_URL=data.json, with footer) ────────── mkdir -p "$COFFEE/styles" "$COFFEE/fonts" -cp "$WORK/ccc.html" "$COFFEE/index.html" +python3 - "$WORK/ccc.html" "$COFFEE/index.html" <<'PYEOF' +import sys, re +src, dst = sys.argv[1], sys.argv[2] +html = open(src).read() +html = re.sub(r'\n\n
.*?
', '', html, flags=re.DOTALL) +open(dst, 'w').write(html) +PYEOF cp "$WORK/favicon.svg" "$COFFEE/favicon.svg" cp "$WORK/styles/main.css" "$COFFEE/styles/main.css" cp "$WORK/styles/ccc.css" "$COFFEE/styles/ccc.css" @@ -22,25 +28,30 @@ cat > "$COFFEE/404.html" <<'HTMLEOF'
-

gumx

+
-

404 not found.

+

404

+

not found.