Quartz v4

Quartz is a set of tools that helps you publish your digital garden and notes as a website for free. Quartz v4 features a from-the-ground rewrite focusing on end-user extensibility and ease-of-use.

Read the documentation and get started: https://quartz.jzhao.xyz/


Obsidian to Quartz

The website is staged in a note taking program called Obsidian. I push the documents to GitHub using a plugin and GitHub actions is used to deploy the website to Neocities. Using GitHub allows me to make changes from my computer, other computers, and even my phone.

How to setup

This isn’t a step-by-step guide. The Quartz documentation is easy enough to follow. With my almost non-existent knowledge of Windows PowerShell and GitHub, I was able to get the website deployed to Neocities in an hour (this doesn’t account for the house of troubleshooting I had to do). To help another person, I have documented the changes I have done.

Connecting Obsidian to GitHub

Once you have Quartz initialized, sync it to a GitHub repository. The Quartz documentation goes over this.

I installed the Obsidian Git plugin. On desktop, I logged into the GitHub Desktop app and the plugin used my login information to perform commit and push to my repository. For mobile, I had to make a Personal access token to commit/push.

The Git plugin’s actual purpose is to sync your Obsidian notes to the cloud for free. For the purpose of the website, I made a GitHub workflow to utilize GitHub actions to build and deploy the website every time there’s a push to the main repository branch.

To use GitHub actions I combined the Quartz to Github Pages workflow and a deploy-to-neocities GitHub Action I found. The action contains a secret which isn’t mentioned in the Quartz docs but is covered in the deploy-to-neocities action page.

name: Deploy Quartz site to GitHub Pages
 
on:
  push:
    branches:
      - v4
 
permissions:
  contents: read
  pages: write
  id-token: write
 
concurrency: # prevent concurrent deploys doing strange things
  group: deploy-to-neocities
  cancel-in-progress: true
 
jobs:
  build:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0 # Fetch all history for git info
      - uses: actions/setup-node@v4
      - name: Install Dependencies
        run: npm ci
      - name: Build Quartz
        run: npx quartz build
      - name: Deploy to neocities
        uses: bcomnes/deploy-to-neocities@v2
        with:
          api_token: ${{ secrets.NEOCITIES_API_TOKEN }}
          cleanup: false
          dist_dir: public