adr

Decision: Why Quartz?

I really wanted to use wikilinks and Hugo does not have (and will not be) supported for now.


Requirements


Starting

Configuring

For the quartz works, I did:

  1. Fork the jackyzha0/quartz project;
  2. Clone;
  3. Optional: Add the remote of my Forgejo - Local Git Server and will be like that:
git remote -v
origin	ssh://git@git.arpa:2222/rodolfolabiapari.github.io.git (fetch)
origin	ssh://git@git.arpa:2222/rodolfolabiapari.github.io.git (push)
quartz	git@github.com:rodolfolabiapari/quartz.git (fetch)
quartz	git@github.com:rodolfolabiapari/quartz.git (push)
upstream	https://github.com/jackyzha0/quartz.git (fetch)
upstream	https://github.com/jackyzha0/quartz.git (push)

After. Inside the project:

npm i
npx quartz create
 
# blog -> new -> baseurl -> shortest.
 
npx quartz plugin install --from-config

Sets up the quartz.config.yaml file and

npx quartz build --serve

Publishing

In Github:

  1. Configure origin remote to be you github repo;
  2. In github settings page:
    1. Configure Github actions
    2. Go to Environmentpage and remove the policy;

Add add the deploy.yaml inside .github/workflows/deploy.yaml as official site demands.

The yaml below already has catppuccin theme from saberzero1 repo.

name: Deploy Quartz site to GitHub Pages
 
on:
  push:
    branches:
      - v5
env:
  THEME_NAME: catppuccin.macchiato
 
permissions:
  contents: read
  pages: write
  id-token: write
 
concurrency:
  group: "pages"
  cancel-in-progress: false
 
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0 # Fetch all history for git info
      - uses: actions/setup-node@v6
        with:
          node-version: 24
      - name: Cache dependencies
        uses: actions/cache@v5
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-
      - name: Cache Quartz plugins
        uses: actions/cache@v5
        with:
          path: .quartz/plugins
          key: ${{ runner.os }}-plugins-${{ hashFiles('quartz.lock.json') }}
          restore-keys: |
            ${{ runner.os }}-plugins-
      - name: Install Dependencies
        run: npm ci
      - name: Fetch Quartz Theme
        run: curl -s -S https://raw.githubusercontent.com/saberzero1/quartz-themes/master/action.sh | bash -s -- $THEME_NAME
      - name: Install Quartz plugins
        run: npx quartz plugin install
      - name: Build Quartz
        run: npx quartz build
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: public
 
  deploy:
    needs: build
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4
 
npx quartz sync

But I prefer my own git push to v5 branch. Works as well.