Skip to content

Commit c65f74f

Browse files
committed
Merge branch 'v4' of https://github.com/jackyzha0/quartz into v4
2 parents 09f21e2 + 4923aff commit c65f74f

File tree

19 files changed

+108
-67
lines changed

19 files changed

+108
-67
lines changed

.github/workflows/build-preview.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fetch-depth: 0
1717

1818
- name: Setup Node
19-
uses: actions/setup-node@v4
19+
uses: actions/setup-node@v5
2020
with:
2121
node-version: 22
2222

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fetch-depth: 0
2525

2626
- name: Setup Node
27-
uses: actions/setup-node@v4
27+
uses: actions/setup-node@v5
2828
with:
2929
node-version: 22
3030

@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
fetch-depth: 0
5959
- name: Setup Node
60-
uses: actions/setup-node@v4
60+
uses: actions/setup-node@v5
6161
with:
6262
node-version: 22
6363
- name: Get package version

docs/configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ This part of the configuration concerns anything that can affect the whole site.
3535
- `{ provider: 'cabin' }` or `{ provider: 'cabin', host: 'https://cabin.example.com' }` (custom domain): use [Cabin](https://withcabin.com);
3636
- `{provider: 'clarity', projectId: '<your-clarity-id-code' }`: use [Microsoft clarity](https://clarity.microsoft.com/). The project id can be found on top of the overview page.
3737
- `{ provider: 'matomo', siteId: '<your-matomo-id-code', host: 'matomo.example.com' }`: use [Matomo](https://matomo.org/), without protocol.
38+
- `{ provider: 'vercel' }`: use [Vercel Web Analytics](https://vercel.com/docs/concepts/analytics).
3839
- `locale`: used for [[i18n]] and date formatting
3940
- `baseUrl`: this is used for sitemaps and RSS feeds that require an absolute URL to know where the canonical 'home' of your site lives. This is normally the deployed URL of your site (e.g. `quartz.jzhao.xyz` for this site). Do not include the protocol (i.e. `https://`) or any leading or trailing slashes.
4041
- This should also include the subpath if you are [[hosting]] on GitHub pages without a custom domain. For example, if my repository is `jackyzha0/quartz`, GitHub pages would deploy to `https://jackyzha0.github.io/quartz` and the `baseUrl` would be `jackyzha0.github.io/quartz`.

docs/hosting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ However, if you'd like to publish your site to the world, you need a way to host
1515
## Cloudflare Pages
1616

1717
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
18-
2. In Account Home, select **Workers & Pages** > **Create application** > **Pages** > **Connect to Git**.
18+
2. In Account Home, select **Compute (Workers)** > **Workers & Pages** > **Create application** > **Pages** > **Connect to Git**.
1919
3. Select the new GitHub repository that you created and, in the **Set up builds and deployments** section, provide the following information:
2020

2121
| Configuration option | Value |

docs/plugins/Latex.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ This plugin accepts the following configuration options:
1414
- `renderEngine`: the engine to use to render LaTeX equations. Can be `"katex"` for [KaTeX](https://katex.org/), `"mathjax"` for [MathJax](https://www.mathjax.org/) [SVG rendering](https://docs.mathjax.org/en/latest/output/svg.html), or `"typst"` for [Typst](https://typst.app/) (a new way to compose LaTeX equation). Defaults to KaTeX.
1515
- `customMacros`: custom macros for all LaTeX blocks. It takes the form of a key-value pair where the key is a new command name and the value is the expansion of the macro. For example: `{"\\R": "\\mathbb{R}"}`
1616

17-
> [!note] Typst support
18-
>
19-
> Currently, typst doesn't support inline-math
20-
2117
## API
2218

2319
- Category: Transformer

package-lock.json

Lines changed: 33 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"dependencies": {
3838
"@clack/prompts": "^0.11.0",
39-
"@floating-ui/dom": "^1.7.3",
39+
"@floating-ui/dom": "^1.7.4",
4040
"@myriaddreamin/rehype-typst": "^0.6.0",
4141
"@napi-rs/simple-git": "0.1.22",
4242
"@tweenjs/tween.js": "^25.0.0",

quartz/build.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,19 @@ async function startWatching(
151151
const changes: ChangeEvent[] = []
152152
watcher
153153
.on("add", (fp) => {
154+
fp = toPosixPath(fp)
154155
if (buildData.ignored(fp)) return
155156
changes.push({ path: fp as FilePath, type: "add" })
156157
void rebuild(changes, clientRefresh, buildData)
157158
})
158159
.on("change", (fp) => {
160+
fp = toPosixPath(fp)
159161
if (buildData.ignored(fp)) return
160162
changes.push({ path: fp as FilePath, type: "change" })
161163
void rebuild(changes, clientRefresh, buildData)
162164
})
163165
.on("unlink", (fp) => {
166+
fp = toPosixPath(fp)
164167
if (buildData.ignored(fp)) return
165168
changes.push({ path: fp as FilePath, type: "delete" })
166169
void rebuild(changes, clientRefresh, buildData)

quartz/cfg.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ export type Analytics =
4747
host: string
4848
siteId: string
4949
}
50+
| {
51+
provider: "vercel"
52+
}
5053

5154
export interface GlobalConfiguration {
5255
pageTitle: string

quartz/components/renderPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,9 @@ export function renderPage(
233233
)
234234

235235
const lang = componentData.fileData.frontmatter?.lang ?? cfg.locale?.split("-")[0] ?? "en"
236+
const direction = i18n(cfg.locale).direction ?? "ltr"
236237
const doc = (
237-
<html lang={lang}>
238+
<html lang={lang} dir={direction}>
238239
<Head {...componentData} />
239240
<body data-slug={slug}>
240241
<DappledLight />

0 commit comments

Comments
 (0)