Notes Collection
Welcome to my notes!
System Overview: Astro Site + Quartz Notes
This setup integrates a collection of notes managed with Quartz into a subdirectory (/notes/) of a main website built with Astro. Both parts are deployed automatically via GitHub Actions to GitHub Pages.
Repositories
- Notes Repository
- https://github.com/pink10000/notes
- Contains the source Markdown notes (
.mdfiles) organized in folders located in the repository root. - Contains the
quartzsubfolder with the Quartz library files,package.json, and configuration. quartz/quartz.config.ts:- Configured with
baseUrl: "pink10000.github.io"so generated links work correctly under the/notes/path. - Uses
ignorePatternsto prevent Quartz from processing non-content files/folders found in the root (like.git,.github,README.md, thequartzfolder itself, etc.).
- Configured with
quartz/content/Directory: Contains a git submodule that pulls from upstream (created usingln -s ../<folder> <folder>etc.) pointing to the actual notes folders and theindex.mdfile located in the repository root (../). These symlinks are committed to Git.- GitHub Actions (
.github/workflows/deploy.yml):- Triggers on push to the
mainbranch. - Checks out code, sets up Node, installs/builds Quartz (primarily verifying build integrity).
- Uses
peter-evans/repository-dispatchto send adeploy-notesevent trigger to the Astro repository, authenticating with aDISPATCH_PATsecret (Personal Access Token withreposcope).
- Triggers on push to the
- Quartz Fork
- https://github.com/pink10000/quartz-site
- Forked from here.
- Contains a git submodule in
content/that pulls from upstream when triggered by a push in thenotesrepository
- Astro Site Repository
- https://github.com/pink10000/pink10000.github.io
- Contains the source code for the main Astro website.
- Includes a
.nojekyllfile in the root to prevent default GitHub Pages Jekyll processing. - GitHub Pages Settings: Configured to deploy using the
GitHub Actionssource. - GitHub Actions (
.github/workflows/deploy-astro.yml):- Triggers on push to
mainOR on receiving therepository_dispatchevent (typedeploy-notes) from thenotesrepository. - Deploy Job:
- Uses
actions/deploy-pagesto take thegithub-pagesartifact uploaded by thebuildjob and deploy it to the GitHub Pages environment.
- Uses
- Triggers on push to
Local Preview (Notes Repository)
- Clone the quartz fork
- Run
git pull --recurse-submodulesto update all submodules - Run
npx quartz build --serve
Check this if not clear.
Result
- The main Astro website is available at
https://pink10000.github.io/. - The published Quartz notes are available under
https://pink10000.github.io/notes/. - Updates pushed to the
mainbranch of the Notes repository automatically trigger the Quartz fork pull + rebuild and deployment of both the notes and the main Astro site.
Last updated: {{ date }}