docs: move IndieKit server config notes to indiekit-server CLAUDE.md

The store-github/Gitea config, Micropub dispatch, and server-push
technique all belong in the server repo. Removed from here; added to
indiekit-server/CLAUDE.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
svemagie
2026-03-31 16:12:54 +02:00
parent 4911219549
commit c8d4dee35e

View File

@@ -134,29 +134,6 @@ The runner shell is POSIX sh (not bash/tcsh). Watch for GNU-only constructs:
- `giersig.eu/indiekit-blog` — this repo (Eleventy + content). Local dir: `indiekit-blog`
- `giersig.eu/indiekit-server` — IndieKit server (Micropub, AP, etc.). Local dir: `indiekit-server`
### IndieKit store-github → Gitea
`store-github` is configured to write posts to Gitea instead of GitHub. Key points:
- **`GITEA_BASE_URL`** must end with a trailing slash: `http://10.100.0.90:3000/api/v1/`
Without it, `new URL(apiPath, baseUrl)` strips the `v1` segment → 404 on all writes.
- **`GH_CONTENT_TOKEN`** must be set in `.env` (the Gitea PAT) — `start.sh` rejects startup if neither `GH_CONTENT_TOKEN` nor `GITHUB_TOKEN` is present.
- **`GITEA_CONTENT_USER`** = `giersig.eu` (the org, not a personal username)
- **`GITEA_CONTENT_REPO`** = `indiekit-blog`
### Pushing workflow changes
The server runs tcsh which mangles long `echo`/`printf` commands. Use a Python heredoc from the server to push via Gitea API:
```python
python3 << 'PYEOF'
import urllib.request, json, base64
# Read file, get SHA, PUT new content to Gitea contents API
PYEOF
```
Always generate base64 from the local file with `base64 -i file | tr -d '\n'` — never copy b64 strings from session history (they can contain corruption).
---
## Common tasks
@@ -223,7 +200,5 @@ GITEA_ORG giersig.eu # Gitea org that owns the repos
- **Content-warning support** — collapsible content on post pages, hidden content on listings
- **Upstream drift check script** — `scripts/check-upstream-widget-drift.mjs`
- **Self-hosted Gitea CI** — replaced GitHub Actions; `act_runner` on FreeBSD (custom `gitea_runner` rc service, `su - git` + `nohup`), sharp built from source with persistent binary cache (`src/build/Release/`), rsync via `deploy` user, syndication webhook via internal jail URL
- **Gitea content store** — `@indiekit/store-github` pointed at `http://10.100.0.90:3000/api/v1/` (trailing slash required for `new URL()` resolution); `GH_CONTENT_TOKEN` in `.env` satisfies `start.sh` preflight; `GITEA_CONTENT_USER=giersig.eu`, `GITEA_BASE_URL` in IndieKit `.env`
- **Micropub → Gitea dispatch** — `patch-micropub-gitea-dispatch.mjs` fires `workflow_dispatch` after each Micropub create/update (Gitea Contents API commits do not trigger `on: push`)
- **Gitea sidebar widget** — `github-repos.njk` renamed to "Gitea"; runtime JS fetches commits/repos/PRs directly from `gitea.giersig.eu` API; build-time data via `_data/githubActivity.js` + `_data/githubRepos.js` (both use Gitea org API). Widget configured via `site.gitea.{url,org,repos}` in `_data/site.js`
- **Changelog → Gitea** — `/changelog` page fetches commits directly from Gitea API (both repos), with client-side commit categorisation (feat/fix/docs/chore/refactor); no longer depends on IndieKit's GitHub proxy endpoint