From 2c4ea82e8622e59645bae7a2632aa899e3a263db Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Fri, 18 Aug 2023 18:22:38 -0700 Subject: [PATCH] update docs on github pages and syncing --- content/authoring content.md | 15 +++++++++++++++ content/hosting.md | 7 ++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/content/authoring content.md b/content/authoring content.md index 4e3c3c83..7aa8d629 100644 --- a/content/authoring content.md +++ b/content/authoring content.md @@ -31,3 +31,18 @@ Some common frontmatter fields that are natively supported by Quartz: - `aliases`: Other names for this note. This is a list of strings. - `draft`: Whether to publish the page or not. This is one way to make [[private pages|pages private]] in Quartz. - `date`: A string representing the day the note was published. Normally uses `YYYY-MM-DD` format. + +## Syncing your Content + +When you're Quartz is at a point you're happy with, you can save your changes to GitHub by doing `npx quartz sync`. + +> [!hint] Flags and options +> For full help options, you can run `npx quartz sync --help`. +> +> Most of these have sensible defaults but you can override them if you have a custom setup: +> +> - `-d` or `--directory`: the content folder. This is normally just `content` +> - `-v` or `--verbose`: print out extra logging information +> - `--commit` or `--no-commit`: whether to make a `git` commit for your changes +> - `--push` or `--no-push`: whether to push updates to your GitHub fork of Quartz +> - `--pull` or `--no-pull`: whether to try and pull in any updates from your GitHub fork (i.e. from other devices) before pushing diff --git a/content/hosting.md b/content/hosting.md index 1e900a5b..2251f918 100644 --- a/content/hosting.md +++ b/content/hosting.md @@ -53,7 +53,7 @@ jobs: build: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch all history for git info - uses: actions/setup-node@v3 @@ -85,6 +85,11 @@ Then: 1. Head to "Settings" tab of your forked repository and in the sidebar, click "Pages". Under "Source", select "GitHub Actions". 2. Commit these changes by doing `npx quartz sync`. This should deploy your site to `.github.io/`. +> [!hint] +> If you get an error about not being allowed to deploy to `github-pages` due to environment protection rules, make sure you remove any existing GitHub pages environments. +> +> You can do this by going to your Settings page on your GitHub fork and going to the Environments tab and pressing the trash icon. The GitHub action will recreate the environment for you correctly the next time you sync your Quartz. + ### Custom Domain Here's how to add a custom domain to your GitHub pages deployment.