Wiki Editor Setup
The documentation site includes an in-page editor for the two approved project editors. Cloudflare Access supplies identity; Pages Functions write changes to a shared GitHub draft branch.
Required Cloudflare Access configuration
Section titled “Required Cloudflare Access configuration”Protect both of these paths with the same Access application and exact-email allow policy:
docs.sitraachra.com/*docs.sitraachra.com/api/*
The API trusts the authenticated email supplied by Cloudflare Access and then checks it against EDITOR_EMAILS.
Required Pages variables
Section titled “Required Pages variables”Open Workers & Pages → the documentation project → Settings → Variables and Secrets.
Add:
| Name | Type | Value |
|---|---|---|
GITHUB_TOKEN |
Encrypted secret | Fine-grained GitHub token with Contents read/write access to ericas-incantations/Sitra-Achra |
EDITOR_EMAILS |
Variable | The two approved email addresses, comma-separated |
GITHUB_REPO |
Variable | ericas-incantations/Sitra-Achra |
DRAFT_BRANCH |
Variable | wiki-drafts |
MAIN_BRANCH |
Variable | main |
Never place GITHUB_TOKEN in the repository, browser JavaScript, or a public environment variable.
Critical deployment-queue setting
Section titled “Critical deployment-queue setting”Only main should produce Cloudflare builds.
Under Builds & deployments → Branch control:
- Production branch:
main - Preview branch builds: disabled, or configured to exclude
wiki-draftsandagent/*
Every editor save creates a Git commit on wiki-drafts. Allowing preview builds for that branch would recreate the large deployment queue the draft workflow is designed to avoid.
Editor workflow
Section titled “Editor workflow”- Sign in through Cloudflare Access.
- Use Edit page, New page, or Add image in the floating toolbar.
- Save as often as needed. All saves go to
wiki-drafts. - Either editor can continue from the shared branch.
- Use Publish drafts once the batch is ready.
- Publishing fast-forwards
mainonce, creating one production deployment.
Image uploads
Section titled “Image uploads”The editor accepts:
- drag-and-drop local images;
- file selection;
- direct HTTP or HTTPS image URLs.
Supported formats are JPEG, PNG, WebP, GIF, and AVIF, up to 8 MB. Files are written beneath site/public/references/images/uploads/, and metadata is appended to site/src/data/reference-images.json.
A pasted URL must point directly to an image response. Web pages such as Pinterest, Behance, or museum record pages should be entered as the source page while the actual image file is uploaded separately.
Wiki links
Section titled “Wiki links”Write [[Page Title]] in Markdown. During the build, the site generates a title index for every documentation page. On rendered pages, matching titles become internal links automatically.
The link text must match the target page’s frontmatter title exactly, ignoring capitalization.
Conflict behavior
Section titled “Conflict behavior”Publishing is deliberately refused when main has diverged from wiki-drafts. This prevents the editor from overwriting repository work made outside the web interface. Resolve or reset the draft branch before publishing again.