βββ β ββ β¦ ββ β βββ
Associated notes
This note is part of a series about how this blog is set up. See here for an overview.
This note is about how to spin up your own quartz instance, hosted on GitHub Pages. Itβs a minimal setup that will look like the Quartz documentation) and itβs the starting point for additional customizations.
In this guide weβll host Quartz on GitHub Pages, however there are other options. This basic setup requires no locally installed software, you can work entirely on the GitHub website.
- Fork https://github.com/jackyzha0/quartz into your GitHub account.
- Your blog can be reachable at
GHUSERNAME.github.io
(fork asGHUSERNAME.github.io
) or a subdomain, likeGHUSERNAME.github.io/blog
(fork asblog
). You only need to fork the branchv4
.
- Your blog can be reachable at
- (optional) Create new branch βupstreamβ
- From branch
v4
, useful to compare changes that happen upstream, see this note for more details.
- From branch
- (optional) Delete the files
README.md
and.github/workflows/ci.yaml
- Create a new file
content/index.md
.- The file can be empty (for now), look here for inspirations.
- Follow the Minimal required config changes:
- See the start of
quartz.config.ts
below for the two lines that need to be changed (might change with newer Quartz versions).
- See the start of
- Create a new file
.github/workflows/deploy.yml
, for the contents see https://quartz.jzhao.xyz/hosting#github-pages - Head to βSettingsβ tab of your forked repository and in the sidebar, click βPagesβ. Under βSourceβ, select βGitHub Actionsβ.
- (optional) Follow the instructions for use with a custom domain if you donβt want your URL to contain
github.io
import { QuartzConfig } from "./quartz/cfg"
import * as Plugin from "./quartz/plugins"
/**
* Quartz 4.0 Configuration
*
* See https://quartz.jzhao.xyz/configuration for more information.
*/
const config: QuartzConfig = {
configuration: {
pageTitle: "πͺ΄ Quartz 4.0",
enableSPA: true,
enablePopovers: true,
analytics: {
provider: "plausible",
},
locale: "en-US",
baseUrl: "quartz.jzhao.xyz",
ignorePatterns: ["private", "templates", ".obsidian"],
defaultDateType: "created",
New blog posts can be created by creating new files in the folder content
(or in a subdirectory of this folder).
delete the folder βcontentβ and the file README.md (and Build and Test
workflow)
βββ β ββ β¦ ββ β βββ