From d1a387078d171a5f6ab11de4f5b2aa239a079ef5 Mon Sep 17 00:00:00 2001 From: X9 Dev Date: Wed, 3 Jun 2026 16:39:48 +0200 Subject: [PATCH] deploy(forgejo): version the navbar back-link header.tmpl The Forgejo UI customization (top-left logo replaced with a xetup.x9.cz back-link) lives in the Forgejo data volume, which is not under git. Keep the source here with a deploy README so it survives a volume loss. Co-Authored-By: Claude Opus 4.8 --- deploy/forgejo/README.md | 34 +++++++++++++++++++++ deploy/forgejo/templates/custom/header.tmpl | 33 ++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 deploy/forgejo/README.md create mode 100644 deploy/forgejo/templates/custom/header.tmpl diff --git a/deploy/forgejo/README.md b/deploy/forgejo/README.md new file mode 100644 index 0000000..cc65fcc --- /dev/null +++ b/deploy/forgejo/README.md @@ -0,0 +1,34 @@ +# Forgejo customizations + +Custom UI tweaks for the `xetup-forgejo` instance (git.xetup.x9.cz). These live +in the Forgejo data volume (`xetup_forgejo-data`), which is NOT under git, so the +source of truth is kept here and deployed into the container. + +## Files + +- `templates/custom/header.tmpl` - injected into `` on every page. Replaces + the meaningless Forgejo brand logo (top-left navbar) with a back-link to + `xetup.x9.cz`. Pure CSS for the look; a small inline script retargets the + `#navbar-logo` href. + +## Deploy + +Custom templates are read at startup, so a restart is required after any change. + +```bash +# Path inside the container: GITEA_CUSTOM=/data/gitea +docker exec xetup-forgejo sh -c 'mkdir -p /data/gitea/templates/custom' +docker cp deploy/forgejo/templates/custom/header.tmpl \ + xetup-forgejo:/data/gitea/templates/custom/header.tmpl +docker exec xetup-forgejo sh -c 'chown -R git:git /data/gitea/templates' +docker restart xetup-forgejo +``` + +The runner (`xetup-runner`) reconnects on its own after the restart. + +## Verify + +```bash +curl -s http://localhost:3100/x9/xetup/releases | grep -q 'content: "xetup.x9.cz"' \ + && echo "header.tmpl injected" || echo "NOT injected" +``` diff --git a/deploy/forgejo/templates/custom/header.tmpl b/deploy/forgejo/templates/custom/header.tmpl new file mode 100644 index 0000000..3973a69 --- /dev/null +++ b/deploy/forgejo/templates/custom/header.tmpl @@ -0,0 +1,33 @@ + +