mirror of
https://github.com/jackyzha0/quartz
synced 2026-11-30 22:44:41 +01:00
Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
166d09b876 | ||
|
|
3960252445 | ||
|
|
436cce7610 | ||
|
|
4ed26b3943 | ||
|
|
8f469ed237 | ||
|
|
cdc5a0297f | ||
|
|
1dfe7fcdb0 | ||
|
|
7453f7f0d0 | ||
|
|
9c46b01c57 | ||
|
|
842a293ab1 | ||
|
|
64dde0cb9c | ||
|
|
46312a6197 |
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@jackyzha0/quartz": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
`quartz build --config <path>` (or `-C`) reads the site configuration from another file than `./quartz.config.yaml`, so the config can live with the content outside the Quartz folder, and one Quartz install can build several content repositories (#2646). With `--watch`/`--serve`, changes to that file trigger a rebuild.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@jackyzha0/quartz": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Updates `@quartz-community/obsidian-flavored-markdown` to 2.3.1, which renders callout titles in `.callout-title-inner` without a `<p>`, as in Obsidian (themes put the title below its icon otherwise). Callout titles are styled on `.callout-title-inner` itself (colour, margin, line height); the `> p` rule stays for sites on an older obsidian-flavored-markdown.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@jackyzha0/quartz": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Updates dependencies with minor and patch releases: `@clack/prompts` 1.9.0, `@napi-rs/simple-git` 1.2.0, `isomorphic-git` 1.44.18, `minimatch` 11.0.9, `preact-render-to-string` 6.8.3 and `prettier` 3.10.1.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@jackyzha0/quartz": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
`quartz plugin install` moves a plugin to its pinned commit even when the plugin's build left tracked files changed (its `package-lock.json`). In CI, a plugin cache restored through `restore-keys` kept those changes, and installing an updated plugin failed with "Please commit your changes or stash them" (#2639).
|
||||||
@@ -11,6 +11,7 @@ The `build` command transforms your Markdown content into a static HTML website.
|
|||||||
| Flag | Shorthand | Description | Default |
|
| Flag | Shorthand | Description | Default |
|
||||||
| ----------------- | --------- | ---------------------------------------------------------------------------------- | ------------------ |
|
| ----------------- | --------- | ---------------------------------------------------------------------------------- | ------------------ |
|
||||||
| `--directory` | `-d` | The content folder | `content` |
|
| `--directory` | `-d` | The content folder | `content` |
|
||||||
|
| `--config` | `-C` | Path to the config file to load (see [[#Custom config file]]) | quartz.config.yaml |
|
||||||
| `--verbose` | `-v` | Print detailed build information (see [[#Verbose output]]) | `false` |
|
| `--verbose` | `-v` | Print detailed build information (see [[#Verbose output]]) | `false` |
|
||||||
| `--output` | `-o` | The directory where the built site will be saved | `public` |
|
| `--output` | `-o` | The directory where the built site will be saved | `public` |
|
||||||
| `--serve` | | Start a local development server | `false` |
|
| `--serve` | | Start a local development server | `false` |
|
||||||
@@ -56,6 +57,17 @@ If you have a very large vault, you can limit the number of concurrent workers t
|
|||||||
npx quartz build --concurrency 2
|
npx quartz build --concurrency 2
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Custom config file
|
||||||
|
|
||||||
|
By default Quartz loads `quartz.config.yaml` from the current working directory. Use `--config` (or `-C`) to point at a config file elsewhere — for example when the config lives alongside your content rather than inside the Quartz install.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
npx quartz build --config ../my-vault/quartz.config.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> The shorthand for `--config` is an uppercase `-C`. A lowercase `-c` is the shorthand for `--concurrency`, so the two are distinct.
|
||||||
|
|
||||||
### Verbose output
|
### Verbose output
|
||||||
|
|
||||||
`npx quartz build --verbose` also prints:
|
`npx quartz build --verbose` also prints:
|
||||||
|
|||||||
Generated
+96
-92
@@ -12,7 +12,7 @@
|
|||||||
"@clack/prompts": "^1.8.0",
|
"@clack/prompts": "^1.8.0",
|
||||||
"@floating-ui/dom": "^1.7.4",
|
"@floating-ui/dom": "^1.7.4",
|
||||||
"@myriaddreamin/rehype-typst": "^0.7.0",
|
"@myriaddreamin/rehype-typst": "^0.7.0",
|
||||||
"@napi-rs/simple-git": "1.1.0",
|
"@napi-rs/simple-git": "1.2.0",
|
||||||
"@quartz-community/alias-redirects": "^1.0.3",
|
"@quartz-community/alias-redirects": "^1.0.3",
|
||||||
"@quartz-community/article-title": "^1.0.2",
|
"@quartz-community/article-title": "^1.0.2",
|
||||||
"@quartz-community/backlinks": "^1.0.3",
|
"@quartz-community/backlinks": "^1.0.3",
|
||||||
@@ -401,28 +401,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@clack/core": {
|
"node_modules/@clack/core": {
|
||||||
"version": "1.5.1",
|
"version": "1.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/@clack/core/-/core-1.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/@clack/core/-/core-1.6.0.tgz",
|
||||||
"integrity": "sha512-iHTrHA8MtVuLl2TfZySmcKv1qO2PoyC9Z7pfSDozEuV5vtY3/wcOPKJXlqJ5Oq2Cx5DDGQGAMVx6HZfRRoVEbQ==",
|
"integrity": "sha512-4GZynIB2IIe431odxesswvWTCP6orvqd6e2b07b3VFWBQRqUqIHc/EPIZwFoKS692QBp+ooPuXKaJV8g4kXuYA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"fast-string-width": "^3.0.2",
|
||||||
"fast-wrap-ansi": "^0.2.0",
|
"fast-wrap-ansi": "^0.2.0",
|
||||||
"sisteransi": "^1.0.5"
|
"sisteransi": "^2.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20.12.0"
|
"node": ">= 20.12.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@clack/prompts": {
|
"node_modules/@clack/prompts": {
|
||||||
"version": "1.8.1",
|
"version": "1.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.9.0.tgz",
|
||||||
"integrity": "sha512-dlT1m5e/0yUL0kRNcQn7yGLVThkgbB0Ga/1AmfDDC/8ik6AIiSf2QLQO2zPYvefsHP0aFgxO93cVLCCfDp7kzQ==",
|
"integrity": "sha512-tEj8X2No2A1c9NDnZECxiiJ8TP3vmFlN9tLlLeSaMqVW4tUmVG2R4qpv/eP4zymWxnymYLkLcIYVV0VcWj3RCQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@clack/core": "1.5.1",
|
"@clack/core": "1.6.0",
|
||||||
"fast-string-width": "^3.0.2",
|
"fast-string-width": "^3.0.2",
|
||||||
"fast-wrap-ansi": "^0.2.0",
|
"fast-wrap-ansi": "^0.2.0",
|
||||||
"sisteransi": "^1.0.5"
|
"sisteransi": "^2.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 20.12.0"
|
"node": ">= 20.12.0"
|
||||||
@@ -1767,9 +1768,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git": {
|
"node_modules/@napi-rs/simple-git": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git/-/simple-git-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git/-/simple-git-1.2.0.tgz",
|
||||||
"integrity": "sha512-u7GiDtu3a5EKh7D0cKYHszWxBWvo8sDEzfv4N/A/4t3FFzu1ctMjz3H8DqlPs2CPrGQOEX2IEY9/f3FAbg9YDA==",
|
"integrity": "sha512-lsUGiHAJmdijXhHCR8d8W931mguJqV7QqXvBTS82BxYadBpW/ot8tXKObQ+c1N31H0Mz0h6mLm2MIBqRInuXWg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"website"
|
"website"
|
||||||
@@ -1778,27 +1779,27 @@
|
|||||||
"node": ">= 10"
|
"node": ">= 10"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@napi-rs/simple-git-android-arm-eabi": "1.1.0",
|
"@napi-rs/simple-git-android-arm-eabi": "1.2.0",
|
||||||
"@napi-rs/simple-git-android-arm64": "1.1.0",
|
"@napi-rs/simple-git-android-arm64": "1.2.0",
|
||||||
"@napi-rs/simple-git-darwin-arm64": "1.1.0",
|
"@napi-rs/simple-git-darwin-arm64": "1.2.0",
|
||||||
"@napi-rs/simple-git-darwin-x64": "1.1.0",
|
"@napi-rs/simple-git-darwin-x64": "1.2.0",
|
||||||
"@napi-rs/simple-git-freebsd-x64": "1.1.0",
|
"@napi-rs/simple-git-freebsd-x64": "1.2.0",
|
||||||
"@napi-rs/simple-git-linux-arm-gnueabihf": "1.1.0",
|
"@napi-rs/simple-git-linux-arm-gnueabihf": "1.2.0",
|
||||||
"@napi-rs/simple-git-linux-arm64-gnu": "1.1.0",
|
"@napi-rs/simple-git-linux-arm64-gnu": "1.2.0",
|
||||||
"@napi-rs/simple-git-linux-arm64-musl": "1.1.0",
|
"@napi-rs/simple-git-linux-arm64-musl": "1.2.0",
|
||||||
"@napi-rs/simple-git-linux-ppc64-gnu": "1.1.0",
|
"@napi-rs/simple-git-linux-ppc64-gnu": "1.2.0",
|
||||||
"@napi-rs/simple-git-linux-s390x-gnu": "1.1.0",
|
"@napi-rs/simple-git-linux-s390x-gnu": "1.2.0",
|
||||||
"@napi-rs/simple-git-linux-x64-gnu": "1.1.0",
|
"@napi-rs/simple-git-linux-x64-gnu": "1.2.0",
|
||||||
"@napi-rs/simple-git-linux-x64-musl": "1.1.0",
|
"@napi-rs/simple-git-linux-x64-musl": "1.2.0",
|
||||||
"@napi-rs/simple-git-win32-arm64-msvc": "1.1.0",
|
"@napi-rs/simple-git-win32-arm64-msvc": "1.2.0",
|
||||||
"@napi-rs/simple-git-win32-ia32-msvc": "1.1.0",
|
"@napi-rs/simple-git-win32-ia32-msvc": "1.2.0",
|
||||||
"@napi-rs/simple-git-win32-x64-msvc": "1.1.0"
|
"@napi-rs/simple-git-win32-x64-msvc": "1.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-android-arm-eabi": {
|
"node_modules/@napi-rs/simple-git-android-arm-eabi": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm-eabi/-/simple-git-android-arm-eabi-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm-eabi/-/simple-git-android-arm-eabi-1.2.0.tgz",
|
||||||
"integrity": "sha512-6/2i3G9LJ8TOq5+DrQj5NObP3sOMdBatNxJBFeTpEqe+B6uBjn/3NrVQ2nvp/bfUNLHRSynQQma7QkrMbBRDnQ==",
|
"integrity": "sha512-WnSWDLbECx/0QfvVpqorUIAAmJ60gSwX/3g0dQwZLNa8RY7oHh/3cQqYRIW0SWv5JD4ckwXvkehVed7LTUKE7g==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -1812,9 +1813,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-android-arm64": {
|
"node_modules/@napi-rs/simple-git-android-arm64": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm64/-/simple-git-android-arm64-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm64/-/simple-git-android-arm64-1.2.0.tgz",
|
||||||
"integrity": "sha512-y47tEA1J/0QYIstjqPuQxFTSXhsjE6HMLXW53wB+MJ07jDe5jQK9b//nXnypx4oJ7DbKwUuWZDbrptq3Cdg+DQ==",
|
"integrity": "sha512-nBfjOUxBzyA82zChLcL9CTBRcCgElYs1lgxymus/v5imZs2+re7tYvTi0rcQ1YdpVmkNZWHiWdngeHxvGzsUvw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1828,9 +1829,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-darwin-arm64": {
|
"node_modules/@napi-rs/simple-git-darwin-arm64": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-arm64/-/simple-git-darwin-arm64-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-arm64/-/simple-git-darwin-arm64-1.2.0.tgz",
|
||||||
"integrity": "sha512-XX1W7+NS5scOmxbrkbMQBn6DQ+zCLqbrFFQ8YeSO6KLznLOQe50EAOQOCZAABUBxTBTKJPaq6sBC25vslwrs8A==",
|
"integrity": "sha512-P7wBGhnlFTRTPDqf0mji1tNYBzsa+/VJdIUWqe3Ne+wNzwDYPakzuyO9iHMRKAVBUgbyTgtuKuVWw1G7uEEDsQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1844,9 +1845,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-darwin-x64": {
|
"node_modules/@napi-rs/simple-git-darwin-x64": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-x64/-/simple-git-darwin-x64-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-x64/-/simple-git-darwin-x64-1.2.0.tgz",
|
||||||
"integrity": "sha512-5BMOxXk31SKcS2ueoOuqe2d/LOvM6BOf2ODrIwELV4KwAxBmPShh69cZHKX7GrbO7FrNGQIeF4Wyz7z2x/w2mA==",
|
"integrity": "sha512-qYFRJj61kjWQ5vgBMGfiNuGKl7aTt1fHY4Y+Ra8a7G3g9IQm9Wx4FXebGVoQ6D8kU3hbizzT8mpqopw1QfHipA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1860,9 +1861,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-freebsd-x64": {
|
"node_modules/@napi-rs/simple-git-freebsd-x64": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-freebsd-x64/-/simple-git-freebsd-x64-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-freebsd-x64/-/simple-git-freebsd-x64-1.2.0.tgz",
|
||||||
"integrity": "sha512-CinaCoDXPTIV1SDAgVHSdsYXw93M4fqkekL2qgXpMQPKYEDyIOyWyJ6ciGQWpRAkBxRYPpUYU28McKBa01mbrQ==",
|
"integrity": "sha512-LEU6FS4aLbe6SdAPi7pxN52R36zUeZTC2//xd3ttH4/eu0NFr/Ha4U1Qtb0rMYL7z9UWMU/T7aT6jopTsOH8XQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1876,9 +1877,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-linux-arm-gnueabihf": {
|
"node_modules/@napi-rs/simple-git-linux-arm-gnueabihf": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm-gnueabihf/-/simple-git-linux-arm-gnueabihf-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm-gnueabihf/-/simple-git-linux-arm-gnueabihf-1.2.0.tgz",
|
||||||
"integrity": "sha512-Eg2KdwAyNDGpC74W/0Cnv4lAIUB2Uhg1+KT59mZlELvxdmbJFE4xDCS4Zh50EDK9nS+t45PZhaxmRrxA7whXzg==",
|
"integrity": "sha512-G33B6VAF9uf7fSGp2RNL7ZBi4E75uVyqPRccpaDHxZS1RUsoV0PzzHlMi4nJoWdJ5Jnzx+fEvkchMYZ6tjXfZQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -1892,9 +1893,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-linux-arm64-gnu": {
|
"node_modules/@napi-rs/simple-git-linux-arm64-gnu": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-gnu/-/simple-git-linux-arm64-gnu-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-gnu/-/simple-git-linux-arm64-gnu-1.2.0.tgz",
|
||||||
"integrity": "sha512-AYZsGSmd5RR847XqKjpqmwLoT/847GvGIF1OhNqtN4UI16gFMlHU3XO+IMxf6quNgA/bY3ILUI5YGswU8e0Y9g==",
|
"integrity": "sha512-MZQ3J6A0exMNkRNSIjypAwwrpxbsvECMjFPnFraFi8kkDCCALdRVeMmfDYM+DYn6S+/VRK5RCgLsiLFMt288uQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1908,9 +1909,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-linux-arm64-musl": {
|
"node_modules/@napi-rs/simple-git-linux-arm64-musl": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-musl/-/simple-git-linux-arm64-musl-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-musl/-/simple-git-linux-arm64-musl-1.2.0.tgz",
|
||||||
"integrity": "sha512-UanfuFboJWiJ4n5BTUmI28sQ2JjssGExn5jcn8BAQ4CECwHpNVanM1Lmw4xGuQCcULxUCUS6speOA8zz7PaOqA==",
|
"integrity": "sha512-/bdgsHtq3GHaeItxLCQ571WU20k6e5lOhbs3nz4Nf3utzhmxiAqi8vmlw5RQpYWAae3LlpZIPr6xXl30ASudRQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1924,9 +1925,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-linux-ppc64-gnu": {
|
"node_modules/@napi-rs/simple-git-linux-ppc64-gnu": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-ppc64-gnu/-/simple-git-linux-ppc64-gnu-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-ppc64-gnu/-/simple-git-linux-ppc64-gnu-1.2.0.tgz",
|
||||||
"integrity": "sha512-EzW2jhtVZYM+N3A0Mc7Ju2+Js8s2HcoK+Cu+TM+XArodnoHNR2VrHVxMG+WY1Ra6pHBd1kyNdHmuSscuo8E60w==",
|
"integrity": "sha512-HHIPt6QnnmrMkO2MJEUPYfrmSgN5h+GCP9dCcmD72fXlTOHiMmMwC7NaW08h05SK8NMxli/h8E5dxt4WilxvIg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
@@ -1940,9 +1941,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-linux-s390x-gnu": {
|
"node_modules/@napi-rs/simple-git-linux-s390x-gnu": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-s390x-gnu/-/simple-git-linux-s390x-gnu-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-s390x-gnu/-/simple-git-linux-s390x-gnu-1.2.0.tgz",
|
||||||
"integrity": "sha512-u9J6YYf7BrvNQ2pTLkPyOGdRhTVz/Nl+FtznebKaxuw7QCZYkOlGWbAeJRdBQ2wXNtdqwfcZZZYa93YxwjsMOA==",
|
"integrity": "sha512-hD1YMetNhL7C3LZrnFfjgCCuLePsazYj/lEgnfmGEzqa0n8DPZmpMJ2itoKQcnnf7CnxUFuhJ0NF6hH/bk98kA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
@@ -1956,9 +1957,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-linux-x64-gnu": {
|
"node_modules/@napi-rs/simple-git-linux-x64-gnu": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-gnu/-/simple-git-linux-x64-gnu-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-gnu/-/simple-git-linux-x64-gnu-1.2.0.tgz",
|
||||||
"integrity": "sha512-owuVJqIb7HXOokeDSe6ipNv1JOv3MUZlGuKs3bbP/b50iV9Wixx4L7Hsph450ERcmoSmQdiQjU9nyC5wEsdf5w==",
|
"integrity": "sha512-E2PKw0ZRQ0RH1odOmW+92dkJg705YTeIhdAr6Tml5lFxRlwvupsxhiXEIPhd5q+S7iYnb8jdI5C+Ye8iNbsFNw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1972,9 +1973,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-linux-x64-musl": {
|
"node_modules/@napi-rs/simple-git-linux-x64-musl": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-musl/-/simple-git-linux-x64-musl-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-musl/-/simple-git-linux-x64-musl-1.2.0.tgz",
|
||||||
"integrity": "sha512-687mjASLaoAkwD9Uu7/tJspV6Np+G6dp/V3CDNssfgl8r/Gdv/hhxC4vE7+QlSeqRJ8cdTl7bA7JKUKxgXQV/A==",
|
"integrity": "sha512-yQCvgBVJJf6fVl3YwyAJCcV4IW9kn3Ozgz6Fw3bz6mUSjQ6xlsSc7GM+sug5mIdrSHyRpxT8BXiTP4flGYlC9g==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1988,9 +1989,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-win32-arm64-msvc": {
|
"node_modules/@napi-rs/simple-git-win32-arm64-msvc": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-arm64-msvc/-/simple-git-win32-arm64-msvc-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-arm64-msvc/-/simple-git-win32-arm64-msvc-1.2.0.tgz",
|
||||||
"integrity": "sha512-REQsy+VMd7JIl4wFvggQE87XmPK3R0nfT7AEys6cU2zyCokogAEkbI2/y/gQLzZ62Evfy0IkdvzWUorS9984DA==",
|
"integrity": "sha512-Ps0CnmHR+XZBfUk8hre7r2vu9eU3Nr8xFj4EWsG1Olia31uBCKlO1pwnbpl5WvkrK/pv7iPpmNSq+5R/tNVPTw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -2004,9 +2005,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-win32-ia32-msvc": {
|
"node_modules/@napi-rs/simple-git-win32-ia32-msvc": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-ia32-msvc/-/simple-git-win32-ia32-msvc-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-ia32-msvc/-/simple-git-win32-ia32-msvc-1.2.0.tgz",
|
||||||
"integrity": "sha512-FRVBqqizxUqEu/F5Ol7nfwzpp+AZc9+WILu0o0HPDIw6f/o1CmULdH2EocFaYWFzvttguouLMz38sHHtz2eeXg==",
|
"integrity": "sha512-6gwSlunF/5PTcZpQA5WzmuizXmD2inrB/SncktDHhWH/FnU0TP6qVnoGtpShZ2gDptABSaS8DoOouOFx0UaIfA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@@ -2020,9 +2021,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/simple-git-win32-x64-msvc": {
|
"node_modules/@napi-rs/simple-git-win32-x64-msvc": {
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-x64-msvc/-/simple-git-win32-x64-msvc-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-x64-msvc/-/simple-git-win32-x64-msvc-1.2.0.tgz",
|
||||||
"integrity": "sha512-fN0Ihi8jkdjjHZi4PXaHtVB11RYxBS4ReUICKosNTeA0ROBvOiMsCQW9yWkWtRudNf+mN9Y9OGJHSKbduw2EZQ==",
|
"integrity": "sha512-eEj9P8mXyRKzug+7ENehPXnaYAFU7w7CwCRrMPIH0DKoXbm/timiTtdNAOhfLnNp/ZMJVa3gXcl9hfLy3kFPDw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -2923,9 +2924,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@quartz-community/obsidian-flavored-markdown": {
|
"node_modules/@quartz-community/obsidian-flavored-markdown": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@quartz-community/obsidian-flavored-markdown/-/obsidian-flavored-markdown-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@quartz-community/obsidian-flavored-markdown/-/obsidian-flavored-markdown-2.3.1.tgz",
|
||||||
"integrity": "sha512-R4QAnmir6wZO6M8608xAE7Z+O9c8uExhSGXPY0a3W71KnmBzOblU4kzsXjU4T3KaifBAyeYjHAVC39qjBcP6iw==",
|
"integrity": "sha512-lQucQG1Cm0KrjRQJfaSf0Ud5ugpnLC8ZG5e5cTFrysu2DVkLeS6ks0c0gXXtc6iK1OyZ49Bzug4HkNKZb6AwHQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@quartz-community/rehype-obsidian": "^1.4.0",
|
"@quartz-community/rehype-obsidian": "^1.4.0",
|
||||||
@@ -5022,9 +5023,9 @@
|
|||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/isomorphic-git": {
|
"node_modules/isomorphic-git": {
|
||||||
"version": "1.44.11",
|
"version": "1.44.18",
|
||||||
"resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.44.11.tgz",
|
"resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.44.18.tgz",
|
||||||
"integrity": "sha512-Y1BohMJU12rnkEMwpiBklgQ+ZQo9PtQencCKQz/zsziilL9+Tn1Bip45cJ51czB8abrf/9oHLDGQE+4IlOVxbA==",
|
"integrity": "sha512-+VgjSGkpuLHG/R8oYcPsRUCcr0ppbCfm3Eiws94I69Xzq8tc1Ar40ahngU52niIYejuTtWrbs/o0padH4SxKqQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async-lock": "^1.4.1",
|
"async-lock": "^1.4.1",
|
||||||
@@ -6097,9 +6098,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/minimatch": {
|
"node_modules/minimatch": {
|
||||||
"version": "11.0.5",
|
"version": "11.0.9",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.9.tgz",
|
||||||
"integrity": "sha512-snPlVppFcYWfLLFQGhDxUyBcHNtMlWmn3jtj7pEaO+DP8pqL0IvAzXhMYmn1z9ASNtgmwLBdFxSf4tMUB0OTKA==",
|
"integrity": "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==",
|
||||||
"license": "BlueOak-1.0.0",
|
"license": "BlueOak-1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@isaacs/nonrecursive-glob-match": "^1.1.0",
|
"@isaacs/nonrecursive-glob-match": "^1.1.0",
|
||||||
@@ -6397,18 +6398,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/preact-render-to-string": {
|
"node_modules/preact-render-to-string": {
|
||||||
"version": "6.8.2",
|
"version": "6.8.3",
|
||||||
"resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.8.2.tgz",
|
"resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.8.3.tgz",
|
||||||
"integrity": "sha512-Hdx7cKD3AMYgt795TdddBpUbuGEFoL/VeA6s7VrBt9Gjt0r6rCy5wMp5xkDjQ9cbKj62frHsEx1x8yV6EjoOpg==",
|
"integrity": "sha512-yg04edGH7f5yfBUV4uyL2brzPB3e26AimLO5WNfUtwoCv8LBJ7Z+dElG8P5v+o8UqMUM6kZhnn4I/HEXNyP0ZQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"preact": ">=10 || >= 11.0.0-0"
|
"preact": ">=10 || >= 11.0.0-0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prettier": {
|
"node_modules/prettier": {
|
||||||
"version": "3.9.10",
|
"version": "3.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.10.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.10.1.tgz",
|
||||||
"integrity": "sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==",
|
"integrity": "sha512-70vp3ZUYoPlFbF9uiTdXHUUCGEIp7d4+6p+8DYbkm2jP7x/3i/paXVF6dopSI3zd/CEitrZN1rc4i85xWmmXlg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -6953,10 +6954,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/sisteransi": {
|
"node_modules/sisteransi": {
|
||||||
"version": "1.0.5",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-2.0.0.tgz",
|
||||||
"integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
|
"integrity": "sha512-2WCqLdt12eN6ehLI50S2/ZxoowXU3DD1KVPRyVP0WEsFahrGZZmCdq1K59qjJljMRIDTwx1D9YaRK+hDneBUMg==",
|
||||||
"license": "MIT"
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"node_modules/slash": {
|
"node_modules/slash": {
|
||||||
"version": "5.1.0",
|
"version": "5.1.0",
|
||||||
|
|||||||
+1
-1
@@ -42,7 +42,7 @@
|
|||||||
"@clack/prompts": "^1.8.0",
|
"@clack/prompts": "^1.8.0",
|
||||||
"@floating-ui/dom": "^1.7.4",
|
"@floating-ui/dom": "^1.7.4",
|
||||||
"@myriaddreamin/rehype-typst": "^0.7.0",
|
"@myriaddreamin/rehype-typst": "^0.7.0",
|
||||||
"@napi-rs/simple-git": "1.1.0",
|
"@napi-rs/simple-git": "1.2.0",
|
||||||
"@quartz-community/alias-redirects": "^1.0.3",
|
"@quartz-community/alias-redirects": "^1.0.3",
|
||||||
"@quartz-community/article-title": "^1.0.2",
|
"@quartz-community/article-title": "^1.0.2",
|
||||||
"@quartz-community/backlinks": "^1.0.3",
|
"@quartz-community/backlinks": "^1.0.3",
|
||||||
|
|||||||
@@ -76,6 +76,11 @@ export const SyncArgv = {
|
|||||||
|
|
||||||
export const BuildArgv = {
|
export const BuildArgv = {
|
||||||
...CommonArgv,
|
...CommonArgv,
|
||||||
|
config: {
|
||||||
|
string: true,
|
||||||
|
alias: ["C"],
|
||||||
|
describe: "path to the config file (default: ./quartz.config.yaml)",
|
||||||
|
},
|
||||||
output: {
|
output: {
|
||||||
string: true,
|
string: true,
|
||||||
alias: ["o"],
|
alias: ["o"],
|
||||||
|
|||||||
+13
-1
@@ -334,6 +334,17 @@ export async function handleBuild(argv) {
|
|||||||
argv.watch = true
|
argv.watch = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Let `--config <path>` override the default ./quartz.config.yaml. Passed down
|
||||||
|
// via env so it reaches the esbuild-bundled build code and worker threads.
|
||||||
|
if (argv.config) {
|
||||||
|
const resolved = path.resolve(argv.config)
|
||||||
|
if (!fs.existsSync(resolved)) {
|
||||||
|
console.error(`Config file not found: ${resolved}`)
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
process.env.QUARTZ_CONFIG_PATH = resolved
|
||||||
|
}
|
||||||
|
|
||||||
// " Quartz v5.1.0 " for a release checkout, plus `git describe` (e.g. v5.1.0-3-g1a2b3c4-dirty) otherwise
|
// " Quartz v5.1.0 " for a release checkout, plus `git describe` (e.g. v5.1.0-3-g1a2b3c4-dirty) otherwise
|
||||||
const checkout = describeQuartzCheckout()
|
const checkout = describeQuartzCheckout()
|
||||||
const describe = checkout.describe && checkout.describe !== `v${version}` ? checkout.describe : ""
|
const describe = checkout.describe && checkout.describe !== `v${version}` ? checkout.describe : ""
|
||||||
@@ -607,8 +618,9 @@ export async function handleBuild(argv) {
|
|||||||
"quartz.config.yaml",
|
"quartz.config.yaml",
|
||||||
"quartz.config.default.yaml",
|
"quartz.config.default.yaml",
|
||||||
])
|
])
|
||||||
|
const extraWatch = process.env.QUARTZ_CONFIG_PATH ? [process.env.QUARTZ_CONFIG_PATH] : []
|
||||||
chokidar
|
chokidar
|
||||||
.watch(paths, { ignoreInitial: true })
|
.watch([...paths, ...extraWatch], { ignoreInitial: true })
|
||||||
.on("add", () => build(clientRefresh))
|
.on("add", () => build(clientRefresh))
|
||||||
.on("change", () => build(clientRefresh))
|
.on("change", () => build(clientRefresh))
|
||||||
.on("unlink", () => build(clientRefresh))
|
.on("unlink", () => build(clientRefresh))
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ const LEGACY_PLUGINS_JSON_PATH = path.join(process.cwd(), "quartz.plugins.json")
|
|||||||
const LEGACY_DEFAULT_PLUGINS_JSON_PATH = path.join(process.cwd(), "quartz.plugins.default.json")
|
const LEGACY_DEFAULT_PLUGINS_JSON_PATH = path.join(process.cwd(), "quartz.plugins.default.json")
|
||||||
|
|
||||||
function resolveConfigPath() {
|
function resolveConfigPath() {
|
||||||
|
if (process.env.QUARTZ_CONFIG_PATH) return path.resolve(process.env.QUARTZ_CONFIG_PATH)
|
||||||
if (fs.existsSync(CONFIG_YAML_PATH)) return CONFIG_YAML_PATH
|
if (fs.existsSync(CONFIG_YAML_PATH)) return CONFIG_YAML_PATH
|
||||||
if (fs.existsSync(LEGACY_PLUGINS_JSON_PATH)) return LEGACY_PLUGINS_JSON_PATH
|
if (fs.existsSync(LEGACY_PLUGINS_JSON_PATH)) return LEGACY_PLUGINS_JSON_PATH
|
||||||
if (fs.existsSync(DEFAULT_CONFIG_YAML_PATH)) return DEFAULT_CONFIG_YAML_PATH
|
if (fs.existsSync(DEFAULT_CONFIG_YAML_PATH)) return DEFAULT_CONFIG_YAML_PATH
|
||||||
|
|||||||
@@ -176,11 +176,13 @@ async function cloneAtCommitAsync({ url, ref, commit, dir }) {
|
|||||||
/**
|
/**
|
||||||
* Move a shallow clone to a pinned commit. The commit is fetched by SHA (GitHub and most hosts
|
* Move a shallow clone to a pinned commit. The commit is fetched by SHA (GitHub and most hosts
|
||||||
* allow fetching reachable commits), so a pin that is no longer the branch tip works (#2559).
|
* allow fetching reachable commits), so a pin that is no longer the branch tip works (#2559).
|
||||||
|
* The checkout is forced: the plugin directory is Quartz's clone, and its build (npm install)
|
||||||
|
* rewrites tracked files such as package-lock.json, which a restored CI cache keeps (#2639).
|
||||||
*/
|
*/
|
||||||
async function checkoutPinnedCommitAsync(dir, commit) {
|
export async function checkoutPinnedCommitAsync(dir, commit) {
|
||||||
assertCommit(commit)
|
assertCommit(commit)
|
||||||
await gitAsync(["fetch", "--depth", "1", "origin", commit], { cwd: dir })
|
await gitAsync(["fetch", "--depth", "1", "origin", commit], { cwd: dir })
|
||||||
await gitAsync(["checkout", "--quiet", commit], { cwd: dir })
|
await gitAsync(["checkout", "--quiet", "--force", commit], { cwd: dir })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,7 +4,13 @@ import { execSync } from "child_process"
|
|||||||
import fs from "fs"
|
import fs from "fs"
|
||||||
import os from "os"
|
import os from "os"
|
||||||
import path from "path"
|
import path from "path"
|
||||||
import { buildPluginAsync, linkPeerPlugins, pluginSourceChanged } from "./plugin-git-handlers.js"
|
import { pathToFileURL } from "url"
|
||||||
|
import {
|
||||||
|
buildPluginAsync,
|
||||||
|
checkoutPinnedCommitAsync,
|
||||||
|
linkPeerPlugins,
|
||||||
|
pluginSourceChanged,
|
||||||
|
} from "./plugin-git-handlers.js"
|
||||||
|
|
||||||
let root
|
let root
|
||||||
let hostPreact
|
let hostPreact
|
||||||
@@ -161,3 +167,48 @@ describe("pluginSourceChanged", () => {
|
|||||||
assert.strictEqual(pluginSourceChanged(priorEntry, "github:owner/new-repo"), true)
|
assert.strictEqual(pluginSourceChanged(priorEntry, "github:owner/new-repo"), true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe("checkoutPinnedCommitAsync", () => {
|
||||||
|
const git = (cwd, cmd) =>
|
||||||
|
execSync(`git -c user.name=t -c user.email=t@t -c commit.gpgsign=false ${cmd}`, {
|
||||||
|
cwd,
|
||||||
|
stdio: "pipe",
|
||||||
|
timeout: 30000,
|
||||||
|
})
|
||||||
|
.toString()
|
||||||
|
.trim()
|
||||||
|
|
||||||
|
function makeRemote() {
|
||||||
|
const remote = path.join(root, "remote")
|
||||||
|
fs.mkdirSync(remote)
|
||||||
|
git(remote, "init -q -b main")
|
||||||
|
git(remote, "config uploadpack.allowAnySHA1InWant true")
|
||||||
|
fs.writeFileSync(path.join(remote, "package-lock.json"), `{ "v": 1 }`)
|
||||||
|
git(remote, "add -A")
|
||||||
|
git(remote, "commit -q -m one")
|
||||||
|
const first = git(remote, "rev-parse HEAD")
|
||||||
|
fs.writeFileSync(path.join(remote, "package-lock.json"), `{ "v": 2 }`)
|
||||||
|
git(remote, "commit -q -am two")
|
||||||
|
return { remote, first }
|
||||||
|
}
|
||||||
|
|
||||||
|
test("moves to a pinned commit that is not the branch tip", async () => {
|
||||||
|
const { remote, first } = makeRemote()
|
||||||
|
const dir = path.join(root, "plugin")
|
||||||
|
git(root, `clone -q --depth 1 ${pathToFileURL(remote).href} "${dir}"`)
|
||||||
|
await checkoutPinnedCommitAsync(dir, first)
|
||||||
|
assert.strictEqual(git(dir, "rev-parse HEAD"), first)
|
||||||
|
})
|
||||||
|
|
||||||
|
// a plugin's build (npm install) rewrites its tracked package-lock.json; a restored CI cache
|
||||||
|
// keeps that change, and the checkout refused to move ("commit your changes or stash them")
|
||||||
|
test("moves even when the plugin's build left tracked files changed (#2639)", async () => {
|
||||||
|
const { remote, first } = makeRemote()
|
||||||
|
const dir = path.join(root, "plugin")
|
||||||
|
git(root, `clone -q --depth 1 ${pathToFileURL(remote).href} "${dir}"`)
|
||||||
|
fs.writeFileSync(path.join(dir, "package-lock.json"), `{ "v": "rewritten by npm" }`)
|
||||||
|
await checkoutPinnedCommitAsync(dir, first)
|
||||||
|
assert.strictEqual(git(dir, "rev-parse HEAD"), first)
|
||||||
|
assert.strictEqual(fs.readFileSync(path.join(dir, "package-lock.json"), "utf-8"), `{ "v": 1 }`)
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
import test, { describe, afterEach } from "node:test"
|
import test, { describe, afterEach } from "node:test"
|
||||||
import assert from "node:assert"
|
import assert from "node:assert"
|
||||||
|
import path from "path"
|
||||||
import {
|
import {
|
||||||
buildLayoutForEntries,
|
buildLayoutForEntries,
|
||||||
isExcluded,
|
isExcluded,
|
||||||
|
resolveConfigPath,
|
||||||
resolveGroups,
|
resolveGroups,
|
||||||
validateDependencies,
|
validateDependencies,
|
||||||
detectCategoryFromModule,
|
detectCategoryFromModule,
|
||||||
@@ -13,6 +15,23 @@ import { componentRegistry } from "../../components/registry"
|
|||||||
import type { QuartzComponent, QuartzComponentConstructor } from "../../components/types"
|
import type { QuartzComponent, QuartzComponentConstructor } from "../../components/types"
|
||||||
import { PluginJsonEntry, LayoutPosition } from "./types"
|
import { PluginJsonEntry, LayoutPosition } from "./types"
|
||||||
|
|
||||||
|
describe("resolveConfigPath", () => {
|
||||||
|
afterEach(() => {
|
||||||
|
delete process.env.QUARTZ_CONFIG_PATH
|
||||||
|
})
|
||||||
|
|
||||||
|
test("QUARTZ_CONFIG_PATH overrides the default lookup", () => {
|
||||||
|
const custom = path.join("some", "dir", "quartz.config.yaml")
|
||||||
|
process.env.QUARTZ_CONFIG_PATH = custom
|
||||||
|
assert.strictEqual(resolveConfigPath(), path.resolve(custom))
|
||||||
|
})
|
||||||
|
|
||||||
|
test("falls back to the cwd default when QUARTZ_CONFIG_PATH is unset", () => {
|
||||||
|
delete process.env.QUARTZ_CONFIG_PATH
|
||||||
|
assert.notStrictEqual(resolveConfigPath(), path.resolve("some", "dir", "quartz.config.yaml"))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
const makeComponent = (name: string): QuartzComponent => {
|
const makeComponent = (name: string): QuartzComponent => {
|
||||||
const c = (() => null) as unknown as QuartzComponent
|
const c = (() => null) as unknown as QuartzComponent
|
||||||
c.displayName = name
|
c.displayName = name
|
||||||
|
|||||||
@@ -83,7 +83,9 @@ const DEFAULT_CONFIG_YAML_PATH = path.join(process.cwd(), "quartz.config.default
|
|||||||
const LEGACY_PLUGINS_JSON_PATH = path.join(process.cwd(), "quartz.plugins.json")
|
const LEGACY_PLUGINS_JSON_PATH = path.join(process.cwd(), "quartz.plugins.json")
|
||||||
const LEGACY_DEFAULT_PLUGINS_JSON_PATH = path.join(process.cwd(), "quartz.plugins.default.json")
|
const LEGACY_DEFAULT_PLUGINS_JSON_PATH = path.join(process.cwd(), "quartz.plugins.default.json")
|
||||||
|
|
||||||
function resolveConfigPath(): string {
|
/** @internal Exported for testing only. Honors QUARTZ_CONFIG_PATH, else falls back to cwd. */
|
||||||
|
export function resolveConfigPath(): string {
|
||||||
|
if (process.env.QUARTZ_CONFIG_PATH) return path.resolve(process.env.QUARTZ_CONFIG_PATH)
|
||||||
if (fs.existsSync(CONFIG_YAML_PATH)) return CONFIG_YAML_PATH
|
if (fs.existsSync(CONFIG_YAML_PATH)) return CONFIG_YAML_PATH
|
||||||
if (fs.existsSync(LEGACY_PLUGINS_JSON_PATH)) return LEGACY_PLUGINS_JSON_PATH
|
if (fs.existsSync(LEGACY_PLUGINS_JSON_PATH)) return LEGACY_PLUGINS_JSON_PATH
|
||||||
if (fs.existsSync(DEFAULT_CONFIG_YAML_PATH)) return DEFAULT_CONFIG_YAML_PATH
|
if (fs.existsSync(DEFAULT_CONFIG_YAML_PATH)) return DEFAULT_CONFIG_YAML_PATH
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import type { PluginSource, QuartzPluginsJson } from "./types.js"
|
|||||||
import { absorbingBuiltin } from "../builtins/index.js"
|
import { absorbingBuiltin } from "../builtins/index.js"
|
||||||
|
|
||||||
function resolveConfigPath(): string {
|
function resolveConfigPath(): string {
|
||||||
|
if (process.env.QUARTZ_CONFIG_PATH) return path.resolve(process.env.QUARTZ_CONFIG_PATH)
|
||||||
const configYamlPath = path.join(process.cwd(), "quartz.config.yaml")
|
const configYamlPath = path.join(process.cwd(), "quartz.config.yaml")
|
||||||
const defaultConfigYamlPath = path.join(process.cwd(), "quartz.config.default.yaml")
|
const defaultConfigYamlPath = path.join(process.cwd(), "quartz.config.default.yaml")
|
||||||
const legacyPluginsJsonPath = path.join(process.cwd(), "quartz.plugins.json")
|
const legacyPluginsJsonPath = path.join(process.cwd(), "quartz.plugins.json")
|
||||||
|
|||||||
@@ -161,6 +161,9 @@
|
|||||||
--callout-icon: var(--callout-icon-fold);
|
--callout-icon: var(--callout-icon-fold);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The title's text sits in .callout-title-inner, as in Obsidian; obsidian-flavored-markdown
|
||||||
|
// before 2.3.1 wrapped it in a <p>
|
||||||
|
& > .callout-title-inner,
|
||||||
& > .callout-title-inner > p {
|
& > .callout-title-inner > p {
|
||||||
color: var(--color);
|
color: var(--color);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -185,5 +188,7 @@
|
|||||||
|
|
||||||
.callout-title-inner {
|
.callout-title-inner {
|
||||||
font-weight: $semiBoldWeight;
|
font-weight: $semiBoldWeight;
|
||||||
|
// the line height the title had as a <p>
|
||||||
|
line-height: 1.6rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user