Quartz
Quartz is for publishing notebooks (like Obsidian notebooks) into a nice, web-based form.
Alternatives
Section titled Alternatives- MkDocs with a theme like Material, e.g. Jumumu’s repo here (which even has an action to publish to the
gh-pages
branch of the repo (something thatmkdocs gh-deploy
knows about)) - see it live here- They even made a generic deploy action here.
- Starlight
- From Jumumu on 01/27/2024:
- https://jumumu.github.io/starlight-starter/
- https://github.com/Jumumu/starlight-starter
- Overall, there’s a bit more setup involved compared to MkDocs and I listed some gotcha’s at the top of the README.md. It’s also a bit less configurable out of the box, but it’s still nice. I think both are good options.
- From Jumumu on 01/27/2024:
First use
Section titled First useI followed the instructions on the site (don’t try to use pnpm
instead of npm
since it doesn’t seem to work):
I chose these options:
Then, before you can serve the files, create content/index.md
with whatever you want in it (even just “hello world” for testing). It’ll serve as the first page that people see when they go to your notes. Ideally, index.md
should just appear at the top level of your vault.
Finally, serve your files with npx quartz build --serve
.
From here, you can modify your quartz.config.ts
. Here’s my starter one:
Section titled From here, you can modify your quartz.config.ts. Here’s my starter one:Manually publishing to GitHub Pages
Section titled Manually publishing to GitHub PagesFor automatically doing this, see this page.
Manually doing this is very quick! ⚡️
- Make your GitHub Pages repo following these instructions (it’s incredibly simple/fast, <30 seconds).
- Clone it somewhere
- Copy my public notes to Quartz’s
content
folder- Note: I actually just use a symlink:
ln -s ./public /path/to/quartz/content
- Note: I actually just use a symlink:
- Run the build:
npx quartz build
- Copy the entirety of the
public
folder to the Pages repo (so thatindex.html
is at a the top level):cp -r public/ OTHER_REPO
- Push
cd OTHER_REPO
- Make sure you didn’t add any private notes/folders
git commit -am "Publish notes"
git push
Then, to get a custom domain, I went through cPanel:
- Delete the redirect that I had to OneNote
- Go to the Zone Editor
- Add a
CNAME
record pointingnotes.adamlearns.com
→adamlearns.github.io