Tools Overview
# | Type | Title |
---|---|---|
1 | Source | Obsidian |
2 | Static Site Generator | Quartz |
3 | Version Control | GitHub Desktop |
4 | Hosting | GitHub Pages |
Setup Instructions
Note
Choose to either FORK or CLONE the repo.
Feature | Fork | Clone |
---|---|---|
Visibility | - Shows up on the original repo as a fork | - Doesn’t show up on the original repo |
Personal Repo | - Creates a linked personal copy of the original | - Creates a standalone local copy (not tied to the original) |
Changes | - Changes are made in your fork, and visible as your repo | - Changes are local until you push them to your own remote repo |
Syncing | - Can easily sync with the original repo to get updates | - Must manually pull changes from the original if you want updates |
Use Case | - Maintains a connection to the original project, updates easy. | - Full control, manually pull updates from the original |
Prerequisites | 1. GitHub account 2. GitHub Pages setup 3. GitHub Desktop installed 4. Obsidian installed | 1. NodeJS - node -v 2. NPM - Included with NodeJS - npm install -g npm - npm -v 3. Git - git --version 4. GitHub account 5. Obsidian installed |
Amount | - 1 fork per repo | - Multiple clones per repo |
Fork (Easy)
- Sign in to GitHub
- Fork this repository: https://github.com/jackyzha0/quartz
- Rename repo
- Rewrite description
- ✅Copy the v4 branch only
- Edit your repository details
- Go to your repo webpage (Example:
https://github.com/username/repoName
) - Click the ⚙️ gear icon next to the right section that has the About, Description, Website, Readme, etc.
- ✅ Use your GitHub Pages website
- Add some topics like:
obsidian-vault
,quartz
,github-pages
,digital-garden
,notes
) - Include in the home page
- ❌ Releases
- ❌ Packages
- ✅ Deployments
- Save changes
- Add / Create the file:
.github/workflows/deploy.yml
- Paste this into
deploy.yml
- Commit changes
- On your repo webpage, go to Settings, then Pages (Example:
https://github.com/username/repoName/settings/pages
) - Build and Deployment
- Source
- Change the dropdown to GitHub Actions
- Refresh the page
- “Your site is live at …”
- Visit the link
- Clone locally
- Go to your repo webpage (Example:
https://github.com/username/repoName
) - Green button
< > Code
- Open with GitHub Desktop
- Select the local path
- Clone the repository
- How are you planning to use this fork? —
For my own purposes
- Continue
- Fetch origin
- Show in Explorer (Leave this window open if you need the path)
- Launch Obsidian
- Open folder as vault:
content
(this is where your posts go) - Customize your vault
- Transfer your settings and plugins into the
.obsidian
folder - Build locally before publishing your notes publicly! (next 2 steps)
- In the base folder of your repo, right click in the folder to
Open in Terminal
npm audit fix
and then view at http://localhost:8080- Add notes via Obsidian, commit via GitHub Desktop. Repeat this cycle.
- Done!
Clone (Advanced)
- Sign in to GitHub
- Create a new repository
- Repository name
- ✅ Public repository
- DO NOT initialize with a
README.md
file - Create repository
- “Quick setup — if you’ve done this kind of thing before”
- Copy the line shown on the page. (Example:
https://github.com/username/repoName.git
) - Open with GitHub Desktop
- Select the local path
- Clone the repository
- Fetch origin
- Show in Explorer
- Right click in the folder to
Open in Terminal
- `git clone https://github.com/jackyzha0/quartz.git
cd quartz
npm i
npm audit fix
npx quartz create
Empty Quartz
- How should Quartz resolve links?
- Open your Obsidian
- Settings
- File and Links
- New Link Format (What links to insert when auto-generating internal links)
- Default:
Treat links as shortest path
cd..
to primary / base foldergit remote -v
git remote rm origin
git remote add origin https://github.com/username/repoName.git
username
should be your GitHub usernamerepoName
should be your repository namegit remote -v
origin
=your repo
upstream
=the quartz repo
(git remote add upstream https://github.com/jackyzha0/quartz.git
)- Sync your changes:
npx quartz sync --no-pull
- Refresh your repo webpage (Example:
https://github.com/username/repoName
) - Should now have many files
- Add / Create the file:
.github/workflows/deploy.yml
- Paste this into
deploy.yml
- Commit changes
- On your repo webpage, go to Settings, then Pages (Example:
https://github.com/username/repoName/settings/pages
) - Build and Deployment >> Source
- Change the dropdown
Deploy from a Branch
toGitHub Actions
- Back to primary page (Example:
https://github.com/username/repoName
) - Click the ⚙️ gear icon next to the right section that has the About, Description, Website, Readme, etc…
- ✅ Use your GitHub Pages website
- Add some topics like:
obsidian-vault
,quartz
,github-pages
,digital-garden
) - Optional: Include in the home page: ❌ Releases, ❌ Packages, ✅ Deployments
- Save changes
- In Terminal:
git fetch upstream
git merge upstream/v4
(Should say:Already up to date
)- Launch Obsidian
- Open folder as vault:
content
(this is where your posts / notes go) - Transfer your settings and plugins into the
content/.obsidian
folder (For easier navigation: Right-click any file >> Show in System Explorer) - Customize your vault, add some notes
- index is your Front Page
- Build locally before publishing your notes publicly! (next 2 steps)
- In the base folder of your repo, right click in the folder to
Open in Terminal
npx quartz build --serve
- View at where the Terminal says:
Started a Quartz server listening at http://localhost:8080
(example) - Add notes via Obsidian, commit via GitHub Desktop or in Terminal with
npx quartz sync --no-pull
. Repeat this cycle. - Optional: Customize your quartz installation (see section below)
- Done!
Files I Used to Customize Quartz
- Repository Name / Base Folder
.gitignore
quartz.config.ts
quartz.layout.ts
- quartz\
- components\
ContentMeta.tsx
Date.tsx
- styles\
explorer.scss
graph.scss
search.scss
- styles\
base.scss
callouts.scss
variables.scss
- components\
Quick Commands
- Run
Terminal
locally in thequartz
directory / folder
Command | Note |
---|---|
npx quartz --help | - Help, Commands - Examples: npx quartz sync --help and npx quartz build --help |
npx quartz build --serve | - Run a local server to live-preview your Quartz |
npx quartz build --serve --watch | - Watches for changes and rebuilds automatically |
npx quartz sync | - Syncs your local Quartz content with GitHub (pushes changes and updates local content) |
npx quartz sync --no-pull | - Syncs local Quartz content with GitHub without pulling remote updates |
git remote -v | - Shows the remote repos linked to your local Git repo - origin is your fork / copy of the repo- upstream is the original repo you forked from |
git pull origin v4 | - Pulls the latest changes from your forked GitHub repo - v4 is your main branch- origin is your fork / copy of the repo |
git push origin v4 | - Pushes your updates to your forked GitHub repo - v4 is your main branch- origin is your fork / copy of the repo |
git merge upstream/v4 | - Merges the latest changes from the v4 branch of the original Quartz repo (upstream ) into your current branch (origin ) |
npm i | - Installs all dependencies listed in package.json - Run this when setting up Quartz for the first time or after pulling updates |
npm audit fix | - Automatically fixes vulnerabilities in your project’s dependencies. - Recommended to run after installing new dependencies or after npm audit reports any issues. |
Keyboard Shortcuts on Web
Command | Action |
---|---|
⌘ + K Ctrl + K | Search content |
⌘ + Shift + K Ctrl + Shift + K | Search content by tags |
Tab | Cycle forward |
Shift + Tab | Cycle backward |
ArrowUp ArrowDown | Navigate search results |