From 7072689d87042a4674d867807f71e09b5e2b12fe Mon Sep 17 00:00:00 2001 From: Ahmed Date: Wed, 17 Jun 2026 18:45:06 +0300 Subject: fix: added network nav from post receive hook --- hooks/post-receive | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/hooks/post-receive b/hooks/post-receive index 64026a7..38e3061 100644 --- a/hooks/post-receive +++ b/hooks/post-receive @@ -3,4 +3,30 @@ set -e cd /home/git/build/webring bash wr build rsync -rlptD --delete public/ /var/www/webring.gumx.cc/ +python3 - /var/www/webring.gumx.cc <<'EOF' +import sys, os, glob +webroot = sys.argv[1] +favicon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNDAiIGhlaWdodD0iMTQwIiBzdHJva2U9IiMwMDAiPjxwYXRoIHN0cm9rZS13aWR0aD0iMTIyIiBzdHJva2UtZGFzaGFycmF5PSIyLDM4IiBkPSJtOSw3MGgxMjJNNzAsOXYxMjIiLz48cGF0aCBzdHJva2Utd2lkdGg9IjMzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Im03MCwzMGgwbTQwLDQwaDBtLTgwLDQwdjBtNDAsMGgwbTQwLDBoMCIvPjwvc3ZnPg==' +footer = ( + '' +) +favicon_tag = f'' +for path in glob.glob(os.path.join(webroot, '**', '*.html'), recursive=True): + html = open(path).read() + if '' in html and favicon_tag not in html: + html = html.replace('', favicon_tag + '\n', 1) + if '' in html and 'twt.gumx.cc' not in html: + html = html.replace('', footer + '\n', 1) + open(path, 'w').write(html) +EOF echo "webring deployed" -- cgit v1.2.3