xetup/deploy/forgejo/README.md
X9 Dev d1a387078d 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 <noreply@anthropic.com>
2026-06-03 16:39:48 +02:00

34 lines
1.2 KiB
Markdown

# 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 `<head>` 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"
```