docs: updated cli commands

This commit is contained in:
saberzero1
2026-03-31 18:50:38 +02:00
parent db2cc6abca
commit 04912ac2e5
14 changed files with 67 additions and 111 deletions

View File

@@ -13,7 +13,7 @@ However, if you'd like to publish your site to the world, you need a way to host
> Some Quartz features (like [[RSS Feed]] and sitemap generation) require `baseUrl` to be configured properly in your [[configuration]] to work properly. Make sure you set this before deploying!
> [!tip] Keeping plugins in sync
> All hosting examples below use `npx quartz plugin restore` to install plugins from the lockfile. If contributors may add plugins to `quartz.config.yaml` without updating the lockfile, add `npx quartz plugin resolve` after `restore` in your build command to install any missing plugins. See [[cli/plugin#resolve|plugin resolve]] for details.
> All hosting examples below use `npx quartz plugin install` to install plugins from the lockfile. If contributors may add plugins to `quartz.config.yaml` without updating the lockfile, add `npx quartz plugin install --from-config` after `restore` in your build command to install any missing plugins. See [[cli/plugin#resolve|plugin resolve]] for details.
## Cloudflare Pages
@@ -25,7 +25,7 @@ However, if you'd like to publish your site to the world, you need a way to host
| ---------------------- | ----------------------------------------------- |
| Production branch | `v5` |
| Framework preset | `None` |
| Build command | `npx quartz plugin restore && npx quartz build` |
| Build command | `npx quartz plugin install && npx quartz build` |
| Build output directory | `public` |
Press "Save and deploy" and Cloudflare should have a deployed version of your site in about a minute. Then, every time you sync your Quartz changes to GitHub, your site should be updated.
@@ -33,7 +33,7 @@ Press "Save and deploy" and Cloudflare should have a deployed version of your si
To add a custom domain, check out [Cloudflare's documentation](https://developers.cloudflare.com/pages/platform/custom-domains/).
> [!warning]
> Cloudflare Pages performs a shallow clone by default, so if you rely on `git` for timestamps, it is recommended that you add `git fetch --unshallow &&` to the beginning of the build command (e.g., `git fetch --unshallow && npx quartz plugin restore && npx quartz build`).
> Cloudflare Pages performs a shallow clone by default, so if you rely on `git` for timestamps, it is recommended that you add `git fetch --unshallow &&` to the beginning of the build command (e.g., `git fetch --unshallow && npx quartz plugin install && npx quartz build`).
> [!note]
> For more detailed CI/CD configuration including caching and plugin management, see [[ci-cd]].
@@ -72,7 +72,7 @@ jobs:
- name: Install Dependencies
run: npm ci
- name: Restore Quartz plugins
run: npx quartz plugin restore
run: npx quartz plugin install
- name: Build Quartz
run: npx quartz build
- name: Upload artifact
@@ -152,7 +152,7 @@ Before deploying to Vercel, a `vercel.json` file is required at the root of the
| ----------------------------------------- | ----------------------------------------------- |
| Framework Preset | `Other` |
| Root Directory | `./` |
| Build and Output Settings > Build Command | `npx quartz plugin restore && npx quartz build` |
| Build and Output Settings > Build Command | `npx quartz plugin install && npx quartz build` |
5. Press Deploy. Once it's live, you'll have 2 `*.vercel.app` URLs to view the page.
@@ -183,7 +183,7 @@ Using `docs.example.com` is an example of a subdomain. They're a simple way of c
1. Log in to the [Netlify dashboard](https://app.netlify.com/) and click "Add new site".
2. Select your Git provider and repository containing your Quartz project.
3. Under "Build command", enter `npx quartz plugin restore && npx quartz build`.
3. Under "Build command", enter `npx quartz plugin install && npx quartz build`.
4. Under "Publish directory", enter `public`.
5. Press Deploy. Once it's live, you'll have a `*.netlify.app` URL to view the page.
6. To add a custom domain, check "Domain management" in the left sidebar, just like with Vercel.
@@ -211,7 +211,7 @@ build:
- hash -r
- npm ci --cache .npm --prefer-offline
script:
- npx quartz plugin restore
- npx quartz plugin install
- npx quartz build
artifacts:
paths: