I am planning to use Quartz for publishing brain dump, random notes, unpolished thoughts or in short maintaining a Digital Garden. For a more polished and maintained technical blog, you can read in Quarto what I am currently using.
What Is Quartz?
Quartz is a fast, batteries-included static-site generator that transforms Markdown content into fully functional websites.
flowchart LR A["Obsidian<br/><sub>Markdown Editor</sub>"] B["Quartz<br/><sub>Converts Markdown to a bundle of HTML, JS, and CSS files (a website!)</sub>"] C["Cloudflare Pages<br/><sub>Hosting</sub>"] A --> B --> C
My Workflow
I mainly intend to use single Obsidian vault for editing and storing both private and public notes (I am not sure if it is the best way to do it or not but I will improve as I learn more).
Quartz Codebase
- Just followed the instructions on getting started with Quartz(cloning, installing dependencies, initializing quartz).
- I then, followed these instructions to set my own remote GitHub repo
quartz(v4is the main / production branch). - I also created a Justfile to add the lengthy command (ugh, my precious fingers) like:
build:
npx quartz build --serve # for local build preview
update:
npx quartz update # for pulling updates from Quartz official repo
sync:
npx quartz sync # for pushing local changes to your own Quartz repoBy now, Quartz code and content (public notes I want to share with the public) will stay in my own GitHub repo.
TODOs
- Add some GitHub rule to now allow any commits and direct pushes to
v4or main / production branch (as it will cause conflicts withdevbranch when we are sending notes using Quartz Syncer). - Make sure only way to make changes to
quartzrepo is by creating adevtov4PR and merging it.
Hosting
For hosting I am using Cloudflare Pages. Instructions can be found here on how to connect with GitHub repo to automate publishing.
In my quartz repo, I created a file wrangler.toml to define on where the build assets will be, and to disable both preview and workers dev URLs after each build process.
name = "quartz"
workers_dev = false
preview_urls = false
compatibility_date = "2026-02-21"
[build]
command = "npx quartz build"
[assets]
directory = "./public"We can technically now keep adding Markdown file in the content folder and the CI / CD will build and publish the notes. But there is a better way discussed in the next section.
Important: Make sure to create a
devbranch both local and remote. We will create a PR fromdevbranch against main / production branch to publish notes (it will save us Workers build minutes in Cloudflare).
Quartz Syncer
Why?
The challenge was since I was already using single Obsidian vault Second Brain to manage both private and public notes, and in order to publish public notes using Quartz, I could it do in 2 ways:
- I have not tested this method. Quartz expect all the Markdown files to be in
contentfolder in order to generate static content. I could have moved the entire Obsidian vault in this folder and then later open thecontentfolder as vault in Obsidian. Pretty neat, right? The only thing next I was meant to do, was to explicitly mark notes I wanted to publish using ExplicitPublish plugin (so that I have more control over not accidentally sharing private notes.) - The other method was to install Quartz Syncer in Obsidian and use it to tag notes which I wanted to publish explicitly. I PREFERRED THIS METHOD. Because I was looking for some segregation between the concept of vault (which help me to manage both the public and private notes) and digital garden (only public notes). This method also gave me more peace of mind knowing I will be having staging area before I decide to publish anything publicly. I know this method introduces redundancy of notes but I donβt seem to care for now (maybe in the future?)
Instructions
- Install / enable the
Quartz Syncercommunity plugin in Obsidian. - Go to this plugin settings and add
quartzrepo URL (the one we cloned and own) inRemote URL. - Add Username and Access Token.
- THIS IS IMPORTANT. For the branch, I added
dev(a fresh branch I made earlier fromv4or main / production branch ofquartz). We solve 2 problems with this approach:- We can keep pushing new notes to
devbranch and it will give us staging area where we have to create PR first in order to merge notes to main branch. This way we can review we are only merging notes which are meant to be shared by public. - We save
Workers build minutesin Cloudflare pages (free tier). Because every push tov4was triggering build process in Cloudflare pages, costing more build minutes.
- We can keep pushing new notes to
- Now Obsidian is ready to mark notes and push them to
quartzrepo. - To publish any note, open command menu and run
Quartz Syncer: Add publication flagand thenQuartz Syncer: Open publication center. - Review the new notes and changed notes and press publish button. (Make sure to not unselect Published notes because selecting them will unpublish them.)
- Go to
devbranch and confirm the commits and once you feel like you have added enough notes to publish, just create a PR against main branch and merge it. The merge to main branch will trigger the build command in Cloudflare pages.
Theming
You can find community managed themes in this repo: https://github.com/saberzero1/quartz-themes
