Intro
Quartz is a static site generator that turns markdown into html files.

Quartz Setup
8/31/25
Requirements
- Ensure you have at least Node v22 and npm v10.9.2 to function correctly.
node -v && npm -v- Example output:
v20.11.1
10.2.4
- Install NVM, then upgrade Node and npm if needed
nvm install 22
nvm use 22Install Quartz
- Clone the Quartz repo
git clone git@github.com:jackyzha0/quartz.git
cd quartz # Or whatever you rename it to- Install dependencies
npm i- Create a quartz site
- Options: empty quartz, shortest paths (obsidian)
npx quartz createWarning
- If using Powershell, change Powershell profile to run with execution policy bypass
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
Set up GitHub repo
- Create a new repo on github ( Do not initialize the new repository with README, license, or gitignore files)
# list all the repositories that are tracked
git remote -v- Check remote branches
origin https://github.com/jackyzha0/quartz.git (fetch)
origin https://github.com/jackyzha0/quartz.git (push)
upstream https://github.com/jackyzha0/quartz.git (fetch)
upstream https://github.com/jackyzha0/quartz.git (push)- Remove default origin
git remote rm origin- Add your repository as origin
git remote add origin <repo> - Add upstream Quartz repo (for updates)
# if the origin doesn't match your own repository, set your repository as the origin
git remote set-url origin REMOTE-URL
# if you don't have upstream as a remote, add it so updates work
git remote add upstream https://github.com/jackyzha0/quartz.git- For the first time, run command for initial push of your content to your repo
npx quartz sync --no-pull- To push future updates to the repo:
npx quartz syncUpdating Quartz
9/15/25
- fetch latest changes
git fetch upstream- merge them into your branch
git merge upstream/v4- If there are conflicts, you’ll need to resolve them.
Create Obsidian Vault
- See Obsidian
Build and Preview Quartz
https://quartz.jzhao.xyz/build
- Build Quartz
npx quartz build --serve- This will start a local web server to run your Quartz on your computer. Open a web browser and visit
http://localhost:8080/
Flags and options
For full help options, you can run
npx quartz build --help.Most of these have sensible defaults but you can override them if you have a custom setup:
-dor--directory: the content folder. This is normally justcontent-vor--verbose: print out extra logging information-oor--output: the output folder. This is normally justpublic--serve: run a local hot-reloading server to preview your Quartz--port: what port to run the local preview server on--concurrency: how many threads to use to parse notes
Create alias for building quartz
Bash (Linux, WSL)
- Add alias and reload shell
echo "alias quartz='npx quartz build --serve'" >> ~/.bashrc
source ~/.bashrc - Test
quartzPowerShell (Windows)
- Add alias and reload profile
echo "function quartz { npx quartz build --serve }" >> $PROFILE
. $PROFILE- Test
quartzHost your notes on GitHub Pages
https://quartz.jzhao.xyz/hosting#github-pages
-
Right now, people can see it on github but not rendered, its not visitable online
-
Create
workflows/deploy.yamlfile -
Head to “Settings” tab of your forked repository and in the sidebar, click “Pages”. Under “Source”, select “GitHub Actions”.

- Commit these changes by doing npx quartz sync. This should deploy your site to
.github.io/ .




