Publishing
This repository publishes the Obsidian vault with Quartz, builds in GitHub Actions, and deploys the generated static site to Cloudflare Pages.
The workflow is .github/workflows/deploy-quartz.yml.
GitHub settings
Create these repository secrets:
CLOUDFLARE_ACCOUNT_ID: your Cloudflare account ID.CLOUDFLARE_API_TOKEN: a Cloudflare API token withAccount > Cloudflare Pages > Edit.
Create these repository variables:
CLOUDFLARE_PAGES_PROJECT: the Cloudflare Pages project name. Defaults tonotes.QUARTZ_BASE_URL: the public hostname withouthttps://, for examplenotes.example.com. Defaults tonotes-eze.pages.dev.
Cloudflare Pages
Create a Cloudflare Pages project named to match CLOUDFLARE_PAGES_PROJECT. The GitHub Action uses Cloudflare Pages Direct Upload, so Cloudflare does not need to run its own build command.
If you use a custom domain, add it to the Pages project and set QUARTZ_BASE_URL to that hostname.
Cloudflare Access
To password protect the site:
- In Cloudflare, go to
Zero Trust > Access controls > Applications. - Create a new application.
- Choose
Self-hosted and private. - Add the public hostname for the Pages site, for example
notes-eze.pages.devornotes.example.com. - Add an Allow policy for the emails, email domain, GitHub organization, or identity provider group that should have access.
- Set the session duration you want.
Also protect or redirect the default Pages host:
- In the Pages project, enable an Access policy for preview deployments.
- Protect the production
<project>.pages.devhostname with Access, or redirect it to the protected custom domain using Cloudflare Bulk Redirects.
Cloudflare Access is enforced at the Cloudflare edge. Using Cloudflare Pages avoids the github.io bypass that would exist if the protected custom domain pointed at a public GitHub Pages origin, but the default pages.dev hostname still needs to be handled.
Quartz features
Search and graph are enabled by the Quartz layout and ContentIndex emitter:
- Search appears in the left sidebar.
- Local graph appears on note pages.
- The graph component can be toggled to the global graph from the graph control.
Notes with draft: true in frontmatter are excluded by Quartz. The build also excludes Obsidian settings and local agent folders.