Commit 3d22502

Daniel Axtens <dja@axtens.net>
2026-10-09 23:34:29
moar git
1 parent 3002b7c
Changed files (3)
blog
content
nginx
blog/content/code.md
@@ -0,0 +1,8 @@
++++
+date = '2026-10-05T23:04:59+11:00'
+title = 'Code'
+menus = 'main'
++++
+
+ - This website: [www.git](/git/www/index.html)
+ - My fork of Gitmal: [gitmal.git](/git/gitmal/index.html) ([upstream](https://github.com/antonmedv/gitmal/))
nginx/nginx.conf
@@ -21,7 +21,7 @@ http {
 
     keepalive_timeout  65;
 
-    map_hash_max_size 4096;
+    map_hash_max_size 65536;
     map_hash_bucket_size 128;
     map $uri $hash_etag {
         default "";
@@ -78,18 +78,14 @@ http {
         }
 
         location = /git {
-            return 301 https://www.intermittent.network/git/www/index.html;
+            return 301 https://www.intermittent.network/code/;
         }
 
         location = /git/ {
-            return 301 https://www.intermittent.network/git/www/index.html;
+            return 301 https://www.intermittent.network/code/;
         }
 
-        location = /git/www {
-            return 301 https://www.intermittent.network/git/www/index.html;
-        }
-
-        location ^~ /git/www {
+        location ^~ /git/ {
             gzip_vary     on;
             gzip_static   on;
             zstd_static   on;
build.sh
@@ -62,7 +62,7 @@ pushd root/usr/local/www/blog
 generate_etags ""
 popd
 
-# get a git checkout and update it for dumb transport
+# get a www.git git checkout and update it for dumb transport
 git clone --no-hardlinks --bare $SRCDIR root/usr/local/www/git/www.git
 git -C root/usr/local/www/git/www.git remote remove origin
 git -C root/usr/local/www/git/www.git update-server-info
@@ -73,6 +73,18 @@ pushd root/usr/local/www/git/www.git
 mv output ../www
 popd
 
+# get a gitmal.git git checkout and update it for dumb transport
+# (assumes it's in www/../gitmal)
+git clone --no-hardlinks --bare $SRCDIR/../gitmal root/usr/local/www/git/gitmal.git
+git -C root/usr/local/www/git/gitmal.git remote remove origin
+git -C root/usr/local/www/git/gitmal.git update-server-info
+
+# generate static site
+pushd root/usr/local/www/git/gitmal.git
+~/go/bin/gitmal --minify .
+mv output ../gitmal
+popd
+
 # generate the etags
 pushd root/usr/local/www/git/
 generate_etags "/git"
@@ -83,4 +95,3 @@ find root/usr/local/www -type f -exec brotli --squash --best \{\} \; -exec gzip
 
 # copy in cgi-bin last so it doesn't get compressed
 cp -r $SRCDIR/cgi-bin root/usr/local/www/
-