This is the survival manual to keep your knowledge base running smoothly, updated, and synced with the cloud.

1. Routine Checks (Sanity Checks)

Before trying to spin up the local server or deploying, run through this mental checklist:

  • Does the root file exist? The content/ folder must contain a file named index.md (all lowercase). It is the entry point (Home) of the site.
  • Are dependencies installed? The engine needs its parts in place. Whenever you clone the repo or pull a major update, run:
    pnpm install
    (Note: If pnpm blocks essential packages like esbuild or sharp, run pnpm approve-builds, press a to select all, and confirm with y).

2. Running the Server Locally

To write in Obsidian and see the rendered changes in your browser in real-time (Live Reload):

pnpm quartz build --serve
  • The site will be accessible at: http://localhost:8080
  • To shut down the server when finished, simply press Ctrl + C in the terminal.

3. Publishing to the Cloud (Deploy via Git)

Since continuous integration (CI/CD) is already configured on Cloudflare Pages pointing to the v4 branch, deployments are triggered by a simple push.

Once you are done writing your notes:

git add .
git commit -m "docs: knowledge base update"
git push origin v4

Cloudflare intercepts the push, downloads the updates, and automatically puts the new version online in a matter of seconds.

4. Updating the Quartz Engine

The ecosystem evolves quickly. To receive performance improvements and bug fixes from the original repository without affecting your personal notes:

# 1. Pull updates from the original source
git pull upstream v4
 
# 2. Ensure Node packages are aligned with the new version
pnpm install

5. Terminal Automation (Zsh)

To avoid typing Git commands every time you want to publish, add this function to the end of your configuration file (nvim ~/.zshrc):

function pub() {
  git add .
  git commit -m "docs: update notes ($(date +'%Y-%m-%d %H:%M'))"
  git push origin v4
  echo "🚀 Upload complete! Cloudflare is processing the deployment..."
}

After saving, run source ~/.zshrc to reload. From now on, just type pub in the terminal to push everything to the cloud.