wiki

A wiki for personal knowledge.

Edit notes in this repo. A private Quartz site is built from the same folders and hosted on Cloudflare Pages, behind Cloudflare Access (GitHub, your account only).

Tips

Use GitHub’s Web Editor (Better for Multiple Files/Folders)

  1. In your repository, press the period key (.) on your keyboard — this opens the github.dev web-based editor (VS Code-like interface).
  2. In the file tree on the left:
  3. Drag and drop files between folders.
  4. Right-click to create new folders.
  5. Rename or move as needed.
  6. Once done, click the Source Control icon (left sidebar), enter a commit message, and commit/push the changes.

The site rebuilds from main. Keep note folders at the repo root (health/, recipes/, and so on). Do not move them into site/.

View the private site

After Pages + Access are connected, open the *.pages.dev URL and sign in with GitHub. Only your GitHub user should be allowed in.

Keep this GitHub repository private. Login is Cloudflare Access, not a page in the repo.

Cloudflare Pages (first deploy)

You do this in the Cloudflare dashboard. The first deploy is public until Access is on — do not share the URL.

  1. Log in to the Cloudflare dashboardCompute (Workers)Workers & PagesCreatePagesConnect to Git.
  2. Select this repository (nogicode46/wiki).
  3. Build settings:
    • Production branch: main
    • Framework preset: None
    • Build command: npm run build
    • Build output directory: site/public
    • Environment variable: NODE_VERSION = 22 (also set by .node-version)

Canonical links use Cloudflare’s CF_PAGES_URL when present. 4. Save and deploy. Confirm the wiki renders on *.pages.dev.

site/build.sh copies note folders into site/content, then runs Quartz. site/public is generated and not committed.

Cloudflare Access (GitHub, only you)

Pages’ built-in Access toggle only locks preview URLs. Production *.pages.dev needs a Zero Trust Access application.

  1. Zero Trust → SettingsAuthentication → add GitHub as an identity provider.
  2. Zero Trust → AccessApplicationsAdd an applicationSelf-hosted.
  3. Public hostname: the project’s *.pages.dev domain (not only the preview wildcard).
  4. Policy: Allow, include your GitHub account only.
  5. In the Pages project: SettingsGeneral → enable the Access policy for preview deployments as well.
  6. Open the production URL in a private window: you should hit Cloudflare’s GitHub login, then the wiki. Anyone else should be denied.

If a custom domain is added later, create a matching Access application for that hostname too. Until then, stay on *.pages.dev.