To get multiple quartz websites (e.g. one for serious stuff one for fun), we need multiple repos.
Github does not allow forking a repo twice, But there’s a workaround.
By cloning the repo and reset origin, the repo is linked to my own github account, and by setting upstream we can sync it when quartz version is updated.
To host on github. Follow quartz instruction.
- In
quartz/.github/workflows/deploy.yml
,.github
is in the top level, as my folder wasn’t called quartz. - The deploy.yml file might need to be updated later.
Sync repo with upstream:
Archive (no longer useful)
2023-09-14
Upgrade to quartz 4.0
- save content somewhere else
- fetch and sync to v4 branch (force, discard conflicts changes)
- npm i, npx quartz create, Copy and existing folder, choose how links are resolved, pick shortest path (may need to update links later)
- npx quartz build —serve
- restore content/.gitkeep
- git ignore dot obsidian
- add all, push to v4
- edit quartz.config.ts, change site name and base_url
- add .github/workflows/deploy.yml according to Hosting (jzhao.xyz) page
- add the file, not commit
- go to github repo, change default branch to v4
- go to page → source select github action
- locally, run npx quartz sync, it commits the deploy.yml
- it’s served at gr-grey.github.io, not gr-grey.github.io/repo name, maybe because base_url was set to be just gr-grey.github.io
Log what I have done to use quartz as my new site.
- Forked the repo jackyzha0/quartz: 🌱 host your own second brain and digital garden for free (github.com)
- Renamed it to gr-grey.github.io
- Deploy it by allowing read and write permission, and set github page publish (though not sure if necessary since the github.io name change) Deploying Quartz to the Web (jzhao.xyz).
- Configure: change baseURL in “config.toml” and cname in “.github/workflows/deploy.yaml”
- push changes
git push origin hugo