Write and publish these docs
The wiki lives in docs/ and is built with Starlight. Docs delivery explains the design.
Edit locally
Section titled “Edit locally”cd docsnpm cinpm run devOpen http://localhost:4321. Pages are Markdown files under docs/src/content/docs/, grouped by Diátaxis type:
| Folder | Put here |
|---|---|
tutorials/ |
A guided lesson with a known end state |
how-to/ |
Steps to reach one goal, for someone who knows the basics |
reference/ |
Facts to look up: tables, variables, inputs |
explanation/ |
Background, design decisions, trade-offs |
The sidebar is generated from the folders. Use sidebar.order in the frontmatter to sort pages.
Check the production build before pushing:
npm run buildnpm run previewPublish
Section titled “Publish”Merge to main. The Docs workflow builds once and publishes to:
https://docs.cervant.net(Cloudflare Workers static assets)https://docs.home.cervant.net(nginx image on Hyperion, updated by ArgoCD Image Updater)
One-time setup
Section titled “One-time setup”Cloudflare
Section titled “Cloudflare”- Create an API token with the Edit Cloudflare Workers template, scoped to the account and to the
cervant.netzone. - Store the token and the account ID in Bitwarden Secrets Manager, and put their IDs in the Get secrets from Bitwarden step of the
cloudflarejob in.github/workflows/docs.yaml(they start as00000000-...placeholders).
On the first deploy, wrangler creates the homelab-docs Worker and the docs.cervant.net custom domain (DNS record and certificate) from docs/wrangler.jsonc.
To deploy by hand:
cd docsnpm run buildnpx wrangler loginnpm run deploy:cloudflareHyperion
Section titled “Hyperion”- After the first image push, make the
ghcr.io/brsalcedom/homelab-docspackage public (GitHub → Packages → homelab-docs → Package settings). Otherwise the cluster needs animagePullSecret. - Make sure
docs.home.cervant.netresolves to the Cilium Gateway address in the internal DNS (Pi-hole,192.168.10.150), unless a wildcard*.home.cervant.netrecord already covers it. - Apply the Hyperion stack once after
argocd.tfchanges, so the root app ignores the image overrides (see Docs delivery).
Image Updater checks GHCR every two minutes, so docs.home.cervant.net updates a few minutes after docs.cervant.net. To see what it did:
kubectl -n argocd logs deploy/argocd-image-updater-controller | grep homelab-docskubectl -n argocd get application homelab-docs -o jsonpath='{.spec.source.kustomize.images}'No certificate work is needed: the gateway’s wildcard certificate for *.home.cervant.net already covers the hostname.