Skip to content

Commit 06fde50

Browse files
committed
Merge branch 'v4' of https://github.com/jackyzha0/quartz into v4
2 parents e30ac43 + adf4420 commit 06fde50

File tree

16 files changed

+349
-175
lines changed

16 files changed

+349
-175
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build Preview Deployment
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-preview:
10+
if: ${{ github.repository == 'jackyzha0/quartz' }}
11+
runs-on: ubuntu-latest
12+
name: Build Preview
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Setup Node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
22+
23+
- name: Cache dependencies
24+
uses: actions/cache@v4
25+
with:
26+
path: ~/.npm
27+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
28+
restore-keys: |
29+
${{ runner.os }}-node-
30+
31+
- run: npm ci
32+
33+
- name: Check types and style
34+
run: npm run check
35+
36+
- name: Build Quartz
37+
run: npx quartz build -d docs -v
38+
39+
- name: Upload build artifact
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: preview-build
43+
path: public
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Upload Preview Deployment
2+
on:
3+
workflow_run:
4+
workflows: ["Build Preview Deployment"]
5+
types:
6+
- completed
7+
8+
permissions:
9+
actions: read
10+
deployments: write
11+
contents: read
12+
pull-requests: write
13+
14+
jobs:
15+
deploy-preview:
16+
if: ${{ github.repository == 'jackyzha0/quartz' && github.event.workflow_run.conclusion == 'success' }}
17+
runs-on: ubuntu-latest
18+
name: Deploy Preview to Cloudflare Pages
19+
steps:
20+
- name: Download build artifact
21+
uses: actions/download-artifact@v4
22+
id: preview-build-artifact
23+
with:
24+
name: preview-build
25+
path: build
26+
github-token: ${{ secrets.GITHUB_TOKEN }}
27+
run-id: ${{ github.event.workflow_run.id }}
28+
29+
- name: Deploy to Cloudflare Pages
30+
uses: AdrianGonz97/refined-cf-pages-action@v1
31+
with:
32+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
33+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
34+
githubToken: ${{ secrets.GITHUB_TOKEN }}
35+
projectName: quartz
36+
deploymentName: Branch Preview
37+
directory: ${{ steps.preview-build-artifact.outputs.download-path }}

docs/plugins/Favicon.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Favicon
3+
tags:
4+
- plugin/emitter
5+
---
6+
7+
This plugin emits a `favicon.ico` into the `public` folder. It creates the favicon from `icon.png` located in the `quartz/static` folder.
8+
The plugin resizes `icon.png` to 48x48px to make it as small as possible.
9+
10+
> [!note]
11+
> For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page.
12+
13+
This plugin has no configuration options.
14+
15+
## API
16+
17+
- Category: Emitter
18+
- Function name: `Plugin.Favicon()`.
19+
- Source: [`quartz/plugins/emitters/favicon.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/emitters/favicon.ts).

docs/setting up your GitHub repository.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ npx quartz sync --no-pull
3434
> [!warning]- `fatal: --[no-]autostash option is only valid with --rebase`
3535
> You may have an outdated version of `git`. Updating `git` should fix this issue.
3636
37+
> [!warning]- `fatal: The remote end hung up unexpectedly`
38+
> It might be due to Git's default buffer size. You can fix it by increasing the buffer with this command:
39+
>
40+
> ```bash
41+
> git config http.postBuffer 524288000
42+
> ```
43+
3744
In future updates, you can simply run `npx quartz sync` every time you want to push updates to your repository.
3845
3946
> [!hint] Flags and options

0 commit comments

Comments
 (0)