From d03fdc235a7926eed5ad127ffb9c4a5f9c1008b7 Mon Sep 17 00:00:00 2001 From: John Bowdre <61015723+jbowdre@users.noreply.github.com> Date: Mon, 6 May 2024 11:30:21 -0500 Subject: [PATCH 01/49] feat(analytics): Tinylytics support (#1118) * add tinylytics support * fix formatting * add trailing semicolon for consistency --- docs/configuration.md | 3 ++- quartz/cfg.ts | 4 ++++ quartz/plugins/emitters/componentResources.ts | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 1408f71..6c4c928 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -28,8 +28,9 @@ This part of the configuration concerns anything that can affect the whole site. - `{ provider: 'google', tagId: '' }`: use Google Analytics; - `{ provider: 'plausible' }` (managed) or `{ provider: 'plausible', host: '' }` (self-hosted): use [Plausible](https://plausible.io/); - `{ provider: 'umami', host: '', websiteId: '' }`: use [Umami](https://umami.is/); - - `{ provider: 'goatcounter', websiteId: 'my-goatcounter-id' }` (managed) or `{ provider: 'goatcounter', websiteId: 'my-goatcounter-id', host: 'my-goatcounter-domain.com', scriptSrc: 'https://my-url.to/counter.js' }` (self-hosted) use [GoatCounter](https://goatcounter.com) + - `{ provider: 'goatcounter', websiteId: 'my-goatcounter-id' }` (managed) or `{ provider: 'goatcounter', websiteId: 'my-goatcounter-id', host: 'my-goatcounter-domain.com', scriptSrc: 'https://my-url.to/counter.js' }` (self-hosted) use [GoatCounter](https://goatcounter.com); - `{ provider: 'posthog', apiKey: '', host: '' }`: use [Posthog](https://posthog.com/); + - `{ provider: 'tinylytics', siteId: '' }`: use [Tinylytics](https://tinylytics.app/); - `locale`: used for [[i18n]] and date formatting - `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. - 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`. diff --git a/quartz/cfg.ts b/quartz/cfg.ts index 09905e9..13fb516 100644 --- a/quartz/cfg.ts +++ b/quartz/cfg.ts @@ -30,6 +30,10 @@ export type Analytics = apiKey: string host?: string } + | { + provider: "tinylytics" + siteId: string + } export interface GlobalConfiguration { pageTitle: string diff --git a/quartz/plugins/emitters/componentResources.ts b/quartz/plugins/emitters/componentResources.ts index 81d3af2..e6725d9 100644 --- a/quartz/plugins/emitters/componentResources.ts +++ b/quartz/plugins/emitters/componentResources.ts @@ -136,6 +136,14 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso posthog.init('${cfg.analytics.apiKey}',{api_host:'${cfg.analytics.host ?? "https://app.posthog.com"}'})\` document.head.appendChild(posthogScript) `) + } else if (cfg.analytics?.provider === "tinylytics") { + const siteId = cfg.analytics.siteId + componentResources.afterDOMLoaded.push(` + const tinylyticsScript = document.createElement("script") + tinylyticsScript.src = "https://tinylytics.app/embed/${siteId}.js" + tinylyticsScript.defer = true + document.head.appendChild(tinylyticsScript) + `) } if (cfg.enableSPA) { From 438ea6d73b5449c6e6737f6f1f3a06a02e2659c3 Mon Sep 17 00:00:00 2001 From: zenodotus280 <16273022+zenodotus280@users.noreply.github.com> Date: Sun, 12 May 2024 19:04:21 -0700 Subject: [PATCH 02/49] docs(showcase): add patternlanguage.cc (#1135) A self-contained hypertextual catalog of architectural ideas and aesthetic inquiry. --- docs/showcase.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/showcase.md b/docs/showcase.md index 4860e0b..c33f34c 100644 --- a/docs/showcase.md +++ b/docs/showcase.md @@ -27,5 +27,6 @@ Want to see what Quartz can do? Here are some cool community gardens: - [sspaeti.com's Second Brain](https://brain.sspaeti.com/) - [🪴Aster's notebook](https://notes.asterhu.com) - [🥷🏻🌳🍃 Computer Science & Thinkering Garden](https://notes.yxy.ninja) +- [A Pattern Language - Christopher Alexander (Architecture)](https://patternlanguage.cc/) If you want to see your own on here, submit a [Pull Request adding yourself to this file](https://github.com/jackyzha0/quartz/blob/v4/docs/showcase.md)! From 67f3614f3d58d8c27e9dbf6ad2201493b1a627ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 12 May 2024 19:05:27 -0700 Subject: [PATCH 03/49] chore(deps-dev): bump tsx from 4.7.1 to 4.9.3 (#1120) Bumps [tsx](https://github.com/privatenumber/tsx) from 4.7.1 to 4.9.3. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.7.1...v4.9.3) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 424 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 416 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index b8c9e16..9cf994a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -81,7 +81,7 @@ "@types/yargs": "^17.0.32", "esbuild": "^0.19.9", "prettier": "^3.2.4", - "tsx": "^4.7.1", + "tsx": "^4.9.3", "typescript": "^5.4.3" }, "engines": { @@ -2432,9 +2432,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", - "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.4.tgz", + "integrity": "sha512-ofbkKj+0pjXjhejr007J/fLf+sW+8H7K5GCm+msC8q3IpvgjobpyPqSRFemNyIMxklC0zeJpi7VDFna19FacvQ==", "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -5903,13 +5903,13 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsx": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.1.tgz", - "integrity": "sha512-8d6VuibXHtlN5E3zFkgY8u4DX7Y3Z27zvvPKVmLon/D4AjuKzarkUBTLDBgj9iTQ0hg5xM7c/mYiRVM+HETf0g==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.9.3.tgz", + "integrity": "sha512-czVbetlILiyJZI5zGlj2kw9vFiSeyra9liPD4nG+Thh4pKTi0AmMEQ8zdV/L2xbIVKrIqif4sUNrsMAOksx9Zg==", "dev": true, "dependencies": { - "esbuild": "~0.19.10", - "get-tsconfig": "^4.7.2" + "esbuild": "~0.20.2", + "get-tsconfig": "^4.7.3" }, "bin": { "tsx": "dist/cli.mjs" @@ -5921,6 +5921,412 @@ "fsevents": "~2.3.3" } }, + "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ia32": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-loong64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-s390x": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/sunos-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-arm64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-ia32": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/esbuild": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" + } + }, "node_modules/typescript": { "version": "5.4.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", diff --git a/package.json b/package.json index 7cf2798..f584951 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "@types/yargs": "^17.0.32", "esbuild": "^0.19.9", "prettier": "^3.2.4", - "tsx": "^4.7.1", + "tsx": "^4.9.3", "typescript": "^5.4.3" } } From 3c4d54352d69b6274dd62b9510d62419cd15baf4 Mon Sep 17 00:00:00 2001 From: Eledah Date: Mon, 13 May 2024 19:42:06 +0330 Subject: [PATCH 04/49] feat(i18n): add Farsi (#1133) * Add fa-IR translation via upload * Add files via upload * Ran npm run format --- quartz/i18n/index.ts | 2 + quartz/i18n/locales/fa-IR.ts | 83 ++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 quartz/i18n/locales/fa-IR.ts diff --git a/quartz/i18n/index.ts b/quartz/i18n/index.ts index 6707ea3..9a86d61 100644 --- a/quartz/i18n/index.ts +++ b/quartz/i18n/index.ts @@ -15,6 +15,7 @@ import zh from "./locales/zh-CN" import vi from "./locales/vi-VN" import pt from "./locales/pt-BR" import hu from "./locales/hu-HU" +import fa from "./locales/fa-IR" export const TRANSLATIONS = { "en-US": en, @@ -54,6 +55,7 @@ export const TRANSLATIONS = { "vi-VN": vi, "pt-BR": pt, "hu-HU": hu, + "fa-IR": fa, } as const export const defaultTranslation = "en-US" diff --git a/quartz/i18n/locales/fa-IR.ts b/quartz/i18n/locales/fa-IR.ts new file mode 100644 index 0000000..6ea7730 --- /dev/null +++ b/quartz/i18n/locales/fa-IR.ts @@ -0,0 +1,83 @@ +import { Translation } from "./definition" + +export default { + propertyDefaults: { + title: "بدون عنوان", + description: "توضیح خاصی اضافه نشده است", + }, + components: { + callout: { + note: "یادداشت", + abstract: "چکیده", + info: "اطلاعات", + todo: "اقدام", + tip: "نکته", + success: "تیک", + question: "سؤال", + warning: "هشدار", + failure: "شکست", + danger: "خطر", + bug: "باگ", + example: "مثال", + quote: "نقل قول", + }, + backlinks: { + title: "بک‌لینک‌ها", + noBacklinksFound: "بدون بک‌لینک", + }, + themeToggle: { + lightMode: "حالت روشن", + darkMode: "حالت تاریک", + }, + explorer: { + title: "مطالب", + }, + footer: { + createdWith: "ساخته شده با", + }, + graph: { + title: "نمای گراف", + }, + recentNotes: { + title: "یادداشت‌های اخیر", + seeRemainingMore: ({ remaining }) => `${remaining} یادداشت دیگر →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `از ${targetSlug}`, + linkToOriginal: "پیوند به اصلی", + }, + search: { + title: "جستجو", + searchBarPlaceholder: "مطلبی را جستجو کنید", + }, + tableOfContents: { + title: "فهرست", + }, + contentMeta: { + readingTime: ({ minutes }) => `زمان تقریبی مطالعه: ${minutes} دقیقه`, + }, + }, + pages: { + rss: { + recentNotes: "یادداشت‌های اخیر", + lastFewNotes: ({ count }) => `${count} یادداشت اخیر`, + }, + error: { + title: "یافت نشد", + notFound: "این صفحه یا خصوصی است یا وجود ندارد", + }, + folderContent: { + folder: "پوشه", + itemsUnderFolder: ({ count }) => + count === 1 ? ".یک مطلب در این پوشه است" : `${count} مطلب در این پوشه است.`, + }, + tagContent: { + tag: "برچسب", + tagIndex: "فهرست برچسب‌ها", + itemsUnderTag: ({ count }) => + count === 1 ? "یک مطلب با این برچسب" : `${count} مطلب با این برچسب.`, + showingFirst: ({ count }) => `در حال نمایش ${count} برچسب.`, + totalTags: ({ count }) => `${count} برچسب یافت شد.`, + }, + }, +} as const satisfies Translation From 535af55ec8fca7e9138250c6cf33204c8469e613 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 14:25:42 -0700 Subject: [PATCH 05/49] chore(deps): bump hast-util-to-html from 9.0.0 to 9.0.1 (#1137) Bumps [hast-util-to-html](https://github.com/syntax-tree/hast-util-to-html) from 9.0.0 to 9.0.1. - [Release notes](https://github.com/syntax-tree/hast-util-to-html/releases) - [Commits](https://github.com/syntax-tree/hast-util-to-html/compare/9.0.0...9.0.1) --- updated-dependencies: - dependency-name: hast-util-to-html dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9cf994a..303984c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "github-slugger": "^2.0.0", "globby": "^14.0.1", "gray-matter": "^4.0.3", - "hast-util-to-html": "^9.0.0", + "hast-util-to-html": "^9.0.1", "hast-util-to-jsx-runtime": "^2.3.0", "hast-util-to-string": "^3.0.0", "is-absolute-url": "^4.0.1", @@ -2710,9 +2710,9 @@ "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" }, "node_modules/hast-util-to-html": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.0.tgz", - "integrity": "sha512-IVGhNgg7vANuUA2XKrT6sOIIPgaYZnmLx3l/CCOAK0PtgfoHrZwX7jCSYyFxHTrGmC6S9q8aQQekjp4JPZF+cw==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.1.tgz", + "integrity": "sha512-hZOofyZANbyWo+9RP75xIDV/gq+OUKx+T46IlwERnKmfpwp81XBFbT9mi26ws+SJchA4RVUQwIBJpqEOBhMzEQ==", "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", diff --git a/package.json b/package.json index f584951..35313a9 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "github-slugger": "^2.0.0", "globby": "^14.0.1", "gray-matter": "^4.0.3", - "hast-util-to-html": "^9.0.0", + "hast-util-to-html": "^9.0.1", "hast-util-to-jsx-runtime": "^2.3.0", "hast-util-to-string": "^3.0.0", "is-absolute-url": "^4.0.1", From e3cfe1f22fb5054c09f845bc3317b85eb4b0e426 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 23:21:01 -0700 Subject: [PATCH 06/49] chore(deps-dev): bump typescript from 5.4.3 to 5.4.5 (#1092) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.3 to 5.4.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.3...v5.4.5) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 303984c..a2a621f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -82,7 +82,7 @@ "esbuild": "^0.19.9", "prettier": "^3.2.4", "tsx": "^4.9.3", - "typescript": "^5.4.3" + "typescript": "^5.4.5" }, "engines": { "node": ">=18.14", @@ -6328,9 +6328,9 @@ } }, "node_modules/typescript": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", - "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index 35313a9..db20bd1 100644 --- a/package.json +++ b/package.json @@ -105,6 +105,6 @@ "esbuild": "^0.19.9", "prettier": "^3.2.4", "tsx": "^4.9.3", - "typescript": "^5.4.3" + "typescript": "^5.4.5" } } From a97e72f2192ebb07c221acd4bb39840d10ac2c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Garbiec?= Date: Mon, 20 May 2024 21:36:32 +0200 Subject: [PATCH 07/49] i18n: add Polish translation (#1148) * Create pl-PL.ts * add pl-PL to index.ts * import pl-PL in index.ts --- quartz/i18n/index.ts | 2 + quartz/i18n/locales/pl-PL.ts | 83 ++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 quartz/i18n/locales/pl-PL.ts diff --git a/quartz/i18n/index.ts b/quartz/i18n/index.ts index 9a86d61..eab1f1a 100644 --- a/quartz/i18n/index.ts +++ b/quartz/i18n/index.ts @@ -16,6 +16,7 @@ import vi from "./locales/vi-VN" import pt from "./locales/pt-BR" import hu from "./locales/hu-HU" import fa from "./locales/fa-IR" +import pl from "./locales/pl-PL" export const TRANSLATIONS = { "en-US": en, @@ -56,6 +57,7 @@ export const TRANSLATIONS = { "pt-BR": pt, "hu-HU": hu, "fa-IR": fa, + "pl-PL": pl, } as const export const defaultTranslation = "en-US" diff --git a/quartz/i18n/locales/pl-PL.ts b/quartz/i18n/locales/pl-PL.ts new file mode 100644 index 0000000..7b193c1 --- /dev/null +++ b/quartz/i18n/locales/pl-PL.ts @@ -0,0 +1,83 @@ +import { Translation } from "./definition" + +export default { + propertyDefaults: { + title: "Bez nazwy", + description: "Brak opisu", + }, + components: { + callout: { + note: "Notatka", + abstract: "Streszczenie", + info: "informacja", + todo: "Do zrobienia", + tip: "Wskazówka", + success: "Zrobione", + question: "Pytanie", + warning: "Ostrzeżenie", + failure: "Usterka", + danger: "Niebiezpieczeństwo", + bug: "Błąd w kodzie", + example: "Przykład", + quote: "Cytat", + }, + backlinks: { + title: "Odnośniki zwrotne", + noBacklinksFound: "Brak połączeń zwrotnych", + }, + themeToggle: { + lightMode: "Trzyb jasny", + darkMode: "Tryb ciemny", + }, + explorer: { + title: "Przeglądaj", + }, + footer: { + createdWith: "Stworzone z użyciem", + }, + graph: { + title: "Graf", + }, + recentNotes: { + title: "Najnowsze notatki", + seeRemainingMore: ({ remaining }) => `Zobacz ${remaining} nastepnych →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Osadzone ${targetSlug}`, + linkToOriginal: "Łącze do oryginału", + }, + search: { + title: "Szukaj", + searchBarPlaceholder: "Search for something", + }, + tableOfContents: { + title: "Spis treści", + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes} min. czytania `, + }, + }, + pages: { + rss: { + recentNotes: "Najnowsze notatki", + lastFewNotes: ({ count }) => `Ostatnie ${count} notatek`, + }, + error: { + title: "Nie znaleziono", + notFound: "Ta strona jest prywatna lub nie istnieje.", + }, + folderContent: { + folder: "Folder", + itemsUnderFolder: ({ count }) => + count === 1 ? "W tym folderze jest 1 element." : `Elementów w folderze: ${count}.`, + }, + tagContent: { + tag: "Znacznik", + tagIndex: "Spis znaczników", + itemsUnderTag: ({ count }) => + count === 1 ? "Oznaczony 1 element." : `Elementów z tym znacznikiem: ${count}.`, + showingFirst: ({ count }) => `Pokazuje ${count} pierwszych znaczników.`, + totalTags: ({ count }) => `Znalezionych wszystkich znaczników: ${count}.`, + }, + }, +} as const satisfies Translation From a655cec9f690bb045e81172b6cee532d9303ba02 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 13:11:08 -0700 Subject: [PATCH 08/49] chore(deps): bump rimraf from 5.0.5 to 5.0.7 (#1150) updated-dependencies: - dependency-name: rimraf dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index a2a621f..96549aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,7 +53,7 @@ "remark-rehype": "^11.1.0", "remark-smartypants": "^2.1.0", "rfdc": "^1.3.1", - "rimraf": "^5.0.5", + "rimraf": "^5.0.7", "serve-handler": "^6.1.5", "shiki": "^1.2.3", "source-map-support": "^0.5.21", @@ -5419,9 +5419,9 @@ "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==" }, "node_modules/rimraf": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", - "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.7.tgz", + "integrity": "sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg==", "dependencies": { "glob": "^10.3.7" }, @@ -5429,7 +5429,7 @@ "rimraf": "dist/esm/bin.mjs" }, "engines": { - "node": ">=14" + "node": ">=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" diff --git a/package.json b/package.json index db20bd1..41939ce 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "remark-rehype": "^11.1.0", "remark-smartypants": "^2.1.0", "rfdc": "^1.3.1", - "rimraf": "^5.0.5", + "rimraf": "^5.0.7", "serve-handler": "^6.1.5", "shiki": "^1.2.3", "source-map-support": "^0.5.21", From cf1b3f270b2175aa8d5f2cf2860738988d14e711 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 13:11:16 -0700 Subject: [PATCH 09/49] chore(deps): bump shiki from 1.2.3 to 1.6.0 (#1149) updated-dependencies: - dependency-name: shiki dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 96549aa..58d334d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,7 @@ "rfdc": "^1.3.1", "rimraf": "^5.0.7", "serve-handler": "^6.1.5", - "shiki": "^1.2.3", + "shiki": "^1.6.0", "source-map-support": "^0.5.21", "to-vfile": "^8.0.0", "toml": "^3.0.0", @@ -820,9 +820,9 @@ } }, "node_modules/@shikijs/core": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.2.3.tgz", - "integrity": "sha512-SM+aiQVaEK2P53dEcsvhq9+LJPr0rzwezHbMQhHaSrPN4OlOB4vp1qTdhVEKfMg6atdq8s9ZotWW/CSCzWftwg==" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.6.0.tgz", + "integrity": "sha512-NIEAi5U5R7BLkbW1pG/ZKu3eb1lzc3/+jD0lFsuxMT7zjaf9bbNwdNyMr7zh/Zl8EXQtQ+MYBAt5G+JLu+5DlA==" }, "node_modules/@sindresorhus/merge-streams": { "version": "2.3.0", @@ -5571,11 +5571,11 @@ } }, "node_modules/shiki": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.2.3.tgz", - "integrity": "sha512-+v7lO5cJMeV2N2ySK4l+51YX3wTh5I49SLjAOs1ch1DbUfeEytU1Ac9KaZPoZJCVBGycDZ09OBQN5nbcPFc5FQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.6.0.tgz", + "integrity": "sha512-P31ROeXcVgW/k3Z+vUUErcxoTah7ZRaimctOpzGuqAntqnnSmx1HOsvnbAB8Z2qfXPRhw61yptAzCsuKOhTHwQ==", "dependencies": { - "@shikijs/core": "1.2.3" + "@shikijs/core": "1.6.0" } }, "node_modules/signal-exit": { diff --git a/package.json b/package.json index 41939ce..7b3f11a 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "rfdc": "^1.3.1", "rimraf": "^5.0.7", "serve-handler": "^6.1.5", - "shiki": "^1.2.3", + "shiki": "^1.6.0", "source-map-support": "^0.5.21", "to-vfile": "^8.0.0", "toml": "^3.0.0", From 81a4e202362f42a82baa9df2b6b91a774098740b Mon Sep 17 00:00:00 2001 From: Yohann Bacha Date: Tue, 21 May 2024 18:50:58 +0200 Subject: [PATCH 10/49] feat: ability to hide tags in the recent notes component (#1147) * feat: ability to hide tags in the recent notes component * docs: recent notes custom parameters in a table * docs: revert recent notes doc to bullet points * fix: linter issues * Update docs/features/recent notes.md --------- Co-authored-by: Jacky Zhao --- docs/features/recent notes.md | 1 + quartz/components/RecentNotes.tsx | 28 ++++++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/docs/features/recent notes.md b/docs/features/recent notes.md index 9236b7c..75406e5 100644 --- a/docs/features/recent notes.md +++ b/docs/features/recent notes.md @@ -9,6 +9,7 @@ Quartz can generate a list of recent notes based on some filtering and sorting c - Changing the title from "Recent notes": pass in an additional parameter to `Component.RecentNotes({ title: "Recent writing" })` - Changing the number of recent notes: pass in an additional parameter to `Component.RecentNotes({ limit: 5 })` +- Display the note's tags (defaults to true): `Component.RecentNotes({ showTags: false })` - Show a 'see more' link: pass in an additional parameter to `Component.RecentNotes({ linkToMore: "tags/components" })`. This field should be a full slug to a page that exists. - Customize filtering: pass in an additional parameter to `Component.RecentNotes({ filter: someFilterFunction })`. The filter function should be a function that has the signature `(f: QuartzPluginData) => boolean`. - Customize sorting: pass in an additional parameter to `Component.RecentNotes({ sort: someSortFunction })`. By default, Quartz will sort by date and then tie break lexographically. The sort function should be a function that has the signature `(f1: QuartzPluginData, f2: QuartzPluginData) => number`. See `byDateAndAlphabetical` in `quartz/components/PageList.tsx` for an example. diff --git a/quartz/components/RecentNotes.tsx b/quartz/components/RecentNotes.tsx index d99878d..2c32fea 100644 --- a/quartz/components/RecentNotes.tsx +++ b/quartz/components/RecentNotes.tsx @@ -12,6 +12,7 @@ interface Options { title?: string limit: number linkToMore: SimpleSlug | false + showTags: boolean filter: (f: QuartzPluginData) => boolean sort: (f1: QuartzPluginData, f2: QuartzPluginData) => number } @@ -19,6 +20,7 @@ interface Options { const defaultOptions = (cfg: GlobalConfiguration): Options => ({ limit: 3, linkToMore: false, + showTags: true, filter: () => true, sort: byDateAndAlphabetical(cfg), }) @@ -56,18 +58,20 @@ export default ((userOpts?: Partial) => {

)} - + {opts.showTags && ( + + )} ) From 9c726efa3329b647d4fdf346c67dc80762b68077 Mon Sep 17 00:00:00 2001 From: James Bennion-Pedley <35117353+BOJIT@users.noreply.github.com> Date: Wed, 22 May 2024 21:44:54 +0100 Subject: [PATCH 11/49] feat(i18n): homepage link for 404 pages (#1117) * Add homepage link with internationalization * Construct pathname from baseUrl config value * More robust URL manipulation * Add Farsi (#1133) * Fix bad rebase --- quartz/components/pages/404.tsx | 5 +++++ quartz/i18n/locales/ar-SA.ts | 1 + quartz/i18n/locales/de-DE.ts | 1 + quartz/i18n/locales/definition.ts | 1 + quartz/i18n/locales/en-US.ts | 1 + quartz/i18n/locales/es-ES.ts | 1 + quartz/i18n/locales/fa-IR.ts | 1 + quartz/i18n/locales/fr-FR.ts | 1 + quartz/i18n/locales/hu-HU.ts | 1 + quartz/i18n/locales/it-IT.ts | 1 + quartz/i18n/locales/ja-JP.ts | 1 + quartz/i18n/locales/ko-KR.ts | 1 + quartz/i18n/locales/nl-NL.ts | 1 + quartz/i18n/locales/pl-PL.ts | 1 + quartz/i18n/locales/pt-BR.ts | 1 + quartz/i18n/locales/ro-RO.ts | 1 + quartz/i18n/locales/ru-RU.ts | 1 + quartz/i18n/locales/uk-UA.ts | 1 + quartz/i18n/locales/vi-VN.ts | 1 + quartz/i18n/locales/zh-CN.ts | 1 + 20 files changed, 24 insertions(+) diff --git a/quartz/components/pages/404.tsx b/quartz/components/pages/404.tsx index 4ef1b91..63da2c8 100644 --- a/quartz/components/pages/404.tsx +++ b/quartz/components/pages/404.tsx @@ -2,10 +2,15 @@ import { i18n } from "../../i18n" import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "../types" const NotFound: QuartzComponent = ({ cfg }: QuartzComponentProps) => { + // If baseUrl contains a pathname after the domain, use this as the home link + const url = new URL(`https://${cfg.baseUrl ?? "example.com"}`) + const baseDir = url.pathname + return ( ) } diff --git a/quartz/i18n/locales/ar-SA.ts b/quartz/i18n/locales/ar-SA.ts index f704810..8463e2f 100644 --- a/quartz/i18n/locales/ar-SA.ts +++ b/quartz/i18n/locales/ar-SA.ts @@ -70,6 +70,7 @@ export default { error: { title: "غير موجود", notFound: "إما أن هذه الصفحة خاصة أو غير موجودة.", + home: "العوده للصفحة الرئيسية", }, folderContent: { folder: "مجلد", diff --git a/quartz/i18n/locales/de-DE.ts b/quartz/i18n/locales/de-DE.ts index 64c9ba9..023d4be 100644 --- a/quartz/i18n/locales/de-DE.ts +++ b/quartz/i18n/locales/de-DE.ts @@ -65,6 +65,7 @@ export default { error: { title: "Nicht gefunden", notFound: "Diese Seite ist entweder nicht öffentlich oder existiert nicht.", + home: "Return to Homepage", }, folderContent: { folder: "Ordner", diff --git a/quartz/i18n/locales/definition.ts b/quartz/i18n/locales/definition.ts index 1d5d3dd..25a8cd7 100644 --- a/quartz/i18n/locales/definition.ts +++ b/quartz/i18n/locales/definition.ts @@ -67,6 +67,7 @@ export interface Translation { error: { title: string notFound: string + home: string } folderContent: { folder: string diff --git a/quartz/i18n/locales/en-US.ts b/quartz/i18n/locales/en-US.ts index ac283fd..22cf31e 100644 --- a/quartz/i18n/locales/en-US.ts +++ b/quartz/i18n/locales/en-US.ts @@ -65,6 +65,7 @@ export default { error: { title: "Not Found", notFound: "Either this page is private or doesn't exist.", + home: "Return to Homepage", }, folderContent: { folder: "Folder", diff --git a/quartz/i18n/locales/es-ES.ts b/quartz/i18n/locales/es-ES.ts index 37a2a79..8b0adcc 100644 --- a/quartz/i18n/locales/es-ES.ts +++ b/quartz/i18n/locales/es-ES.ts @@ -65,6 +65,7 @@ export default { error: { title: "No se encontró.", notFound: "Esta página es privada o no existe.", + home: "Regresar a la página principal", }, folderContent: { folder: "Carpeta", diff --git a/quartz/i18n/locales/fa-IR.ts b/quartz/i18n/locales/fa-IR.ts index 6ea7730..5bfef5a 100644 --- a/quartz/i18n/locales/fa-IR.ts +++ b/quartz/i18n/locales/fa-IR.ts @@ -65,6 +65,7 @@ export default { error: { title: "یافت نشد", notFound: "این صفحه یا خصوصی است یا وجود ندارد", + home: "بازگشت به صفحه اصلی", }, folderContent: { folder: "پوشه", diff --git a/quartz/i18n/locales/fr-FR.ts b/quartz/i18n/locales/fr-FR.ts index e1dfa48..ef43fa8 100644 --- a/quartz/i18n/locales/fr-FR.ts +++ b/quartz/i18n/locales/fr-FR.ts @@ -65,6 +65,7 @@ export default { error: { title: "Introuvable", notFound: "Cette page est soit privée, soit elle n'existe pas.", + home: "Retour à la page d'accueil", }, folderContent: { folder: "Dossier", diff --git a/quartz/i18n/locales/hu-HU.ts b/quartz/i18n/locales/hu-HU.ts index 6397309..066b777 100644 --- a/quartz/i18n/locales/hu-HU.ts +++ b/quartz/i18n/locales/hu-HU.ts @@ -65,6 +65,7 @@ export default { error: { title: "Nem található", notFound: "Ez a lap vagy privát vagy nem létezik.", + home: "Vissza a kezdőlapra", }, folderContent: { folder: "Mappa", diff --git a/quartz/i18n/locales/it-IT.ts b/quartz/i18n/locales/it-IT.ts index ca8818a..c8c5973 100644 --- a/quartz/i18n/locales/it-IT.ts +++ b/quartz/i18n/locales/it-IT.ts @@ -65,6 +65,7 @@ export default { error: { title: "Non trovato", notFound: "Questa pagina è privata o non esiste.", + home: "Ritorna alla home page", }, folderContent: { folder: "Cartella", diff --git a/quartz/i18n/locales/ja-JP.ts b/quartz/i18n/locales/ja-JP.ts index d429db4..9581b5e 100644 --- a/quartz/i18n/locales/ja-JP.ts +++ b/quartz/i18n/locales/ja-JP.ts @@ -65,6 +65,7 @@ export default { error: { title: "Not Found", notFound: "ページが存在しないか、非公開設定になっています。", + home: "ホームページに戻る", }, folderContent: { folder: "フォルダ", diff --git a/quartz/i18n/locales/ko-KR.ts b/quartz/i18n/locales/ko-KR.ts index ea735b0..9be08d9 100644 --- a/quartz/i18n/locales/ko-KR.ts +++ b/quartz/i18n/locales/ko-KR.ts @@ -65,6 +65,7 @@ export default { error: { title: "Not Found", notFound: "페이지가 존재하지 않거나 비공개 설정이 되어 있습니다.", + home: "홈페이지로 돌아가기", }, folderContent: { folder: "폴더", diff --git a/quartz/i18n/locales/nl-NL.ts b/quartz/i18n/locales/nl-NL.ts index d075d58..ccbafa7 100644 --- a/quartz/i18n/locales/nl-NL.ts +++ b/quartz/i18n/locales/nl-NL.ts @@ -66,6 +66,7 @@ export default { error: { title: "Niet gevonden", notFound: "Deze pagina is niet zichtbaar of bestaat niet.", + home: "Keer terug naar de start pagina", }, folderContent: { folder: "Map", diff --git a/quartz/i18n/locales/pl-PL.ts b/quartz/i18n/locales/pl-PL.ts index 7b193c1..7fa0cd4 100644 --- a/quartz/i18n/locales/pl-PL.ts +++ b/quartz/i18n/locales/pl-PL.ts @@ -65,6 +65,7 @@ export default { error: { title: "Nie znaleziono", notFound: "Ta strona jest prywatna lub nie istnieje.", + home: "Powrót do strony głównej", }, folderContent: { folder: "Folder", diff --git a/quartz/i18n/locales/pt-BR.ts b/quartz/i18n/locales/pt-BR.ts index 489d642..c7b6bfb 100644 --- a/quartz/i18n/locales/pt-BR.ts +++ b/quartz/i18n/locales/pt-BR.ts @@ -65,6 +65,7 @@ export default { error: { title: "Não encontrado", notFound: "Esta página é privada ou não existe.", + home: "Retornar a página inicial", }, folderContent: { folder: "Arquivo", diff --git a/quartz/i18n/locales/ro-RO.ts b/quartz/i18n/locales/ro-RO.ts index 556b189..2de1c8c 100644 --- a/quartz/i18n/locales/ro-RO.ts +++ b/quartz/i18n/locales/ro-RO.ts @@ -66,6 +66,7 @@ export default { error: { title: "Pagina nu a fost găsită", notFound: "Fie această pagină este privată, fie nu există.", + home: "Reveniți la pagina de pornire", }, folderContent: { folder: "Dosar", diff --git a/quartz/i18n/locales/ru-RU.ts b/quartz/i18n/locales/ru-RU.ts index 8ead3ca..18e0817 100644 --- a/quartz/i18n/locales/ru-RU.ts +++ b/quartz/i18n/locales/ru-RU.ts @@ -67,6 +67,7 @@ export default { error: { title: "Страница не найдена", notFound: "Эта страница приватная или не существует", + home: "Вернуться на главную страницу", }, folderContent: { folder: "Папка", diff --git a/quartz/i18n/locales/uk-UA.ts b/quartz/i18n/locales/uk-UA.ts index b636938..d39febb 100644 --- a/quartz/i18n/locales/uk-UA.ts +++ b/quartz/i18n/locales/uk-UA.ts @@ -65,6 +65,7 @@ export default { error: { title: "Не знайдено", notFound: "Ця сторінка або приватна, або не існує.", + home: "Повернутися на головну сторінку", }, folderContent: { folder: "Папка", diff --git a/quartz/i18n/locales/vi-VN.ts b/quartz/i18n/locales/vi-VN.ts index b72ced4..39a8fbc 100644 --- a/quartz/i18n/locales/vi-VN.ts +++ b/quartz/i18n/locales/vi-VN.ts @@ -65,6 +65,7 @@ export default { error: { title: "Không Tìm Thấy", notFound: "Trang này được bảo mật hoặc không tồn tại.", + home: "Trở về trang chủ", }, folderContent: { folder: "Thư Mục", diff --git a/quartz/i18n/locales/zh-CN.ts b/quartz/i18n/locales/zh-CN.ts index 43d0111..b710db5 100644 --- a/quartz/i18n/locales/zh-CN.ts +++ b/quartz/i18n/locales/zh-CN.ts @@ -65,6 +65,7 @@ export default { error: { title: "无法找到", notFound: "私有笔记或笔记不存在。", + home: "返回首页", }, folderContent: { folder: "文件夹", From 77d6d9623fc195f97de4d82f3498b4a5723e3d38 Mon Sep 17 00:00:00 2001 From: Alex Nordstrom <6267244+HyperEpsilon@users.noreply.github.com> Date: Tue, 28 May 2024 16:23:28 -0600 Subject: [PATCH 12/49] feat: add callout metadata parsing (#1172) --- quartz/plugins/transformers/ofm.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index 108f7f7..c407252 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -123,8 +123,8 @@ export const tableWikilinkRegex = new RegExp(/(!?\[\[[^\]]*?\]\])/, "g") const highlightRegex = new RegExp(/==([^=]+)==/, "g") const commentRegex = new RegExp(/%%[\s\S]*?%%/, "g") // from https://github.com/escwxyz/remark-obsidian-callout/blob/main/src/index.ts -const calloutRegex = new RegExp(/^\[\!(\w+)\]([+-]?)/) -const calloutLineRegex = new RegExp(/^> *\[\!\w+\][+-]?.*$/, "gm") +const calloutRegex = new RegExp(/^\[\!(\w+)\|?(\w+)?\]([+-]?)/) +const calloutLineRegex = new RegExp(/^> *\[\!\w+\|?\w*\][+-]?.*$/, "gm") // (?:^| ) -> non-capturing group, tag should start be separated by a space or be the start of the line // #(...) -> capturing group, tag itself must start with # // (?:[-_\p{L}\d\p{Z}])+ -> non-capturing group, non-empty string of (Unicode-aware) alpha-numeric characters and symbols, hyphens and/or underscores @@ -427,7 +427,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin const match = firstLine.match(calloutRegex) if (match && match.input) { - const [calloutDirective, typeString, collapseChar] = match + const [calloutDirective, typeString, calloutMetaData, collapseChar] = match const calloutType = canonicalizeCallout(typeString.toLowerCase()) const collapse = collapseChar === "+" || collapseChar === "-" const defaultState = collapseChar === "-" ? "collapsed" : "expanded" @@ -489,6 +489,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin className: classNames.join(" "), "data-callout": calloutType, "data-callout-fold": collapse, + "data-callout-metadata": calloutMetaData, }, } } From a99e854d1e932f0d3f1f3e8b59e86f7b99c63086 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 29 May 2024 14:47:45 -0500 Subject: [PATCH 13/49] docs: Update showcase.md (#1176) Added Gatekeeper Wiki. --- docs/showcase.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/showcase.md b/docs/showcase.md index c33f34c..9cff3a5 100644 --- a/docs/showcase.md +++ b/docs/showcase.md @@ -28,5 +28,6 @@ Want to see what Quartz can do? Here are some cool community gardens: - [🪴Aster's notebook](https://notes.asterhu.com) - [🥷🏻🌳🍃 Computer Science & Thinkering Garden](https://notes.yxy.ninja) - [A Pattern Language - Christopher Alexander (Architecture)](https://patternlanguage.cc/) +- [Gatekeeper Wiki](https://www.gatekeeper.wiki) If you want to see your own on here, submit a [Pull Request adding yourself to this file](https://github.com/jackyzha0/quartz/blob/v4/docs/showcase.md)! From 9ff4626d25aa28891e92d533f6513a43e3374e13 Mon Sep 17 00:00:00 2001 From: Alex Nordstrom <6267244+HyperEpsilon@users.noreply.github.com> Date: Wed, 29 May 2024 13:48:39 -0600 Subject: [PATCH 14/49] fix: change callout metadata regex to include non-letter characters (#1174) * fix: change callout metadata regex to include non-letter characters * fix: make metadata regex non-greedy This allows for users to have callouts such as > [!NOTE|left foo-bar 123] a ]+ title with square brackets [s] a > Contents --- quartz/plugins/transformers/ofm.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index c407252..414d8f6 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -123,8 +123,8 @@ export const tableWikilinkRegex = new RegExp(/(!?\[\[[^\]]*?\]\])/, "g") const highlightRegex = new RegExp(/==([^=]+)==/, "g") const commentRegex = new RegExp(/%%[\s\S]*?%%/, "g") // from https://github.com/escwxyz/remark-obsidian-callout/blob/main/src/index.ts -const calloutRegex = new RegExp(/^\[\!(\w+)\|?(\w+)?\]([+-]?)/) -const calloutLineRegex = new RegExp(/^> *\[\!\w+\|?\w*\][+-]?.*$/, "gm") +const calloutRegex = new RegExp(/^\[\!(\w+)\|?(.+?)?\]([+-]?)/) +const calloutLineRegex = new RegExp(/^> *\[\!\w+\|?.*?\][+-]?.*$/, "gm") // (?:^| ) -> non-capturing group, tag should start be separated by a space or be the start of the line // #(...) -> capturing group, tag itself must start with # // (?:[-_\p{L}\d\p{Z}])+ -> non-capturing group, non-empty string of (Unicode-aware) alpha-numeric characters and symbols, hyphens and/or underscores From e57984dafc5f07b54af81b90dc4460c2bed8ae1a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 May 2024 12:48:55 -0700 Subject: [PATCH 15/49] chore(deps-dev): bump tsx from 4.9.3 to 4.11.0 (#1168) Bumps [tsx](https://github.com/privatenumber/tsx) from 4.9.3 to 4.11.0. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.9.3...v4.11.0) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 58d334d..e250129 100644 --- a/package-lock.json +++ b/package-lock.json @@ -81,7 +81,7 @@ "@types/yargs": "^17.0.32", "esbuild": "^0.19.9", "prettier": "^3.2.4", - "tsx": "^4.9.3", + "tsx": "^4.11.0", "typescript": "^5.4.5" }, "engines": { @@ -2432,9 +2432,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.4.tgz", - "integrity": "sha512-ofbkKj+0pjXjhejr007J/fLf+sW+8H7K5GCm+msC8q3IpvgjobpyPqSRFemNyIMxklC0zeJpi7VDFna19FacvQ==", + "version": "4.7.5", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.5.tgz", + "integrity": "sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==", "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -5903,13 +5903,13 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsx": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.9.3.tgz", - "integrity": "sha512-czVbetlILiyJZI5zGlj2kw9vFiSeyra9liPD4nG+Thh4pKTi0AmMEQ8zdV/L2xbIVKrIqif4sUNrsMAOksx9Zg==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.11.0.tgz", + "integrity": "sha512-vzGGELOgAupsNVssAmZjbUDfdm/pWP4R+Kg8TVdsonxbXk0bEpE1qh0yV6/QxUVXaVlNemgcPajGdJJ82n3stg==", "dev": true, "dependencies": { "esbuild": "~0.20.2", - "get-tsconfig": "^4.7.3" + "get-tsconfig": "^4.7.5" }, "bin": { "tsx": "dist/cli.mjs" diff --git a/package.json b/package.json index 7b3f11a..0821040 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "@types/yargs": "^17.0.32", "esbuild": "^0.19.9", "prettier": "^3.2.4", - "tsx": "^4.9.3", + "tsx": "^4.11.0", "typescript": "^5.4.5" } } From 3e0e06ff8ac0926b44a5b86e8ded5c2d89a630b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 May 2024 12:49:55 -0700 Subject: [PATCH 16/49] chore(deps): bump ws from 8.16.0 to 8.17.0 (#1169) Bumps [ws](https://github.com/websockets/ws) from 8.16.0 to 8.17.0. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.16.0...8.17.0) --- updated-dependencies: - dependency-name: ws dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index e250129..cef67f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,7 +63,7 @@ "unist-util-visit": "^5.0.0", "vfile": "^6.0.1", "workerpool": "^9.1.1", - "ws": "^8.15.1", + "ws": "^8.17.0", "yargs": "^17.7.2" }, "bin": { @@ -6817,9 +6817,9 @@ } }, "node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", + "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", "engines": { "node": ">=10.0.0" }, diff --git a/package.json b/package.json index 0821040..aa6e35d 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "unist-util-visit": "^5.0.0", "vfile": "^6.0.1", "workerpool": "^9.1.1", - "ws": "^8.15.1", + "ws": "^8.17.0", "yargs": "^17.7.2" }, "devDependencies": { From 94fbf5b0668cc0f4352d433fcb37d621e8aed988 Mon Sep 17 00:00:00 2001 From: RunTheBot <58890327+RunTheBot@users.noreply.github.com> Date: Wed, 29 May 2024 15:52:53 -0400 Subject: [PATCH 17/49] fix: Reorder Unified.js plugins to fix #1132 (#1139) * Reorder Unified.js to fix #1132 * moved latex farther down for bette luck --- quartz.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz.config.ts b/quartz.config.ts index 4b98325..fa08723 100644 --- a/quartz.config.ts +++ b/quartz.config.ts @@ -56,7 +56,6 @@ const config: QuartzConfig = { Plugin.CreatedModifiedDate({ priority: ["frontmatter", "filesystem"], }), - Plugin.Latex({ renderEngine: "katex" }), Plugin.SyntaxHighlighting({ theme: { light: "github-light", @@ -69,6 +68,7 @@ const config: QuartzConfig = { Plugin.TableOfContents(), Plugin.CrawlLinks({ markdownLinkResolution: "shortest" }), Plugin.Description(), + Plugin.Latex({ renderEngine: "katex" }), ], filters: [Plugin.RemoveDrafts()], emitters: [ From 0b9f79e1b779d727588cb9aa475a1cad1c8f237d Mon Sep 17 00:00:00 2001 From: Dinu Blanovschi Date: Wed, 29 May 2024 21:53:23 +0200 Subject: [PATCH 18/49] feat(graph): obsidianLikeFocusOnHover (#1017) * feat(graph): obsidianLikeFocusOnHover * fix: prettier * fix: remove option from config * fix: for when opacityOld < 0.2 * fix: prettier --- quartz/components/scripts/graph.inline.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/quartz/components/scripts/graph.inline.ts b/quartz/components/scripts/graph.inline.ts index 1c9bb5d..e8dec4c 100644 --- a/quartz/components/scripts/graph.inline.ts +++ b/quartz/components/scripts/graph.inline.ts @@ -223,6 +223,18 @@ async function renderGraph(container: string, fullSlug: FullSlug) { .transition() .duration(200) .style("opacity", 0.2) + + d3.selectAll(".node") + .filter((d) => !connectedNodes.includes(d.id)) + .nodes() + .map((it) => d3.select(it.parentNode as HTMLElement).select("text")) + .forEach((it) => { + let opacity = parseFloat(it.style("opacity")) + it.transition() + .duration(200) + .attr("opacityOld", opacity) + .style("opacity", Math.min(opacity, 0.2)) + }) } // highlight links @@ -245,6 +257,12 @@ async function renderGraph(container: string, fullSlug: FullSlug) { if (focusOnHover) { d3.selectAll(".link").transition().duration(200).style("opacity", 1) d3.selectAll(".node").transition().duration(200).style("opacity", 1) + + d3.selectAll(".node") + .filter((d) => !connectedNodes.includes(d.id)) + .nodes() + .map((it) => d3.select(it.parentNode as HTMLElement).select("text")) + .forEach((it) => it.transition().duration(200).style("opacity", it.attr("opacityOld"))) } const currentId = d.id const linkNodes = d3 From 520acbbf6fe3ef43e9b2b662bfb21e0f9c3bb982 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Wed, 29 May 2024 13:04:03 -0700 Subject: [PATCH 19/49] docs: inline code syntax highlighting (closes #1162) --- docs/features/syntax highlighting.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/features/syntax highlighting.md b/docs/features/syntax highlighting.md index 16fef25..bf9baae 100644 --- a/docs/features/syntax highlighting.md +++ b/docs/features/syntax highlighting.md @@ -95,6 +95,16 @@ const [age, setAge] = useState(50) const [name, setName] = useState("Taylor") ``` +### Inline Highlighting + +Append {:lang} to the end of inline code to highlight it like a regular code block. + +``` +This is an array `[1, 2, 3]{:js}` of numbers 1 through 3. +``` + +This is an array `[1, 2, 3]{:js}` of numbers 1 through 3. + ### Line numbers Syntax highlighting has line numbers configured automatically. If you want to start line numbers at a specific number, use `showLineNumbers{number}`: From 73a5ec87f135b72e8f99c0e08ca867b03803c5cd Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Wed, 29 May 2024 13:04:58 -0700 Subject: [PATCH 20/49] docs: fix link to path tests (closes #1163) --- docs/advanced/paths.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced/paths.md b/docs/advanced/paths.md index 9455b98..16f6388 100644 --- a/docs/advanced/paths.md +++ b/docs/advanced/paths.md @@ -48,4 +48,4 @@ Here are the main types of slugs with a rough description of each type of path: - `SimpleSlug`: cannot be relative and shouldn't have `/index` as an ending or a file extension. It _can_ however have a trailing slash to indicate a folder path. - `RelativeURL`: must start with `.` or `..` to indicate it's a relative URL. Shouldn't have `/index` as an ending or a file extension but can contain a trailing slash. -To get a clearer picture of how these relate to each other, take a look at the path tests in `quartz/path.test.ts`. +To get a clearer picture of how these relate to each other, take a look at the path tests in `quartz/util/path.test.ts`. From 244801af65b9e628927c1f1b2518ae62ca2e354f Mon Sep 17 00:00:00 2001 From: Leo Lazou Date: Thu, 30 May 2024 19:42:22 +0200 Subject: [PATCH 21/49] idea: Tags appear as hollow circles on the graph (#1129) * Tags appear as hollow circles on the graph Added a few lines to make tags appear as hollow circles on the graph, as opposed to pages which are plain circles, for better visual separation. * Applied Prettier code style --- quartz/components/scripts/graph.inline.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/quartz/components/scripts/graph.inline.ts b/quartz/components/scripts/graph.inline.ts index e8dec4c..15a9a06 100644 --- a/quartz/components/scripts/graph.inline.ts +++ b/quartz/components/scripts/graph.inline.ts @@ -282,6 +282,13 @@ async function renderGraph(container: string, fullSlug: FullSlug) { // @ts-ignore .call(drag(simulation)) + // make tags hollow circles + node + .filter((d) => d.id.startsWith("tags/")) + .attr("stroke", color) + .attr("stroke-width", 2) + .attr("fill", "var(--light)") + // draw labels const labels = graphNode .append("text") From 09038f160444a9dee2004a3fe6fc22d30114aefd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 18:16:18 -0400 Subject: [PATCH 22/49] chore(deps): bump rehype-pretty-code from 0.13.0 to 0.13.2 (#1184) Bumps [rehype-pretty-code](https://github.com/rehype-pretty/rehype-pretty-code/tree/HEAD/packages/core) from 0.13.0 to 0.13.2. - [Release notes](https://github.com/rehype-pretty/rehype-pretty-code/releases) - [Changelog](https://github.com/rehype-pretty/rehype-pretty-code/blob/master/packages/core/CHANGELOG.md) - [Commits](https://github.com/rehype-pretty/rehype-pretty-code/commits/rehype-pretty-code@0.13.2/packages/core) --- updated-dependencies: - dependency-name: rehype-pretty-code dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index cef67f6..04edeae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,7 @@ "rehype-citation": "^2.0.0", "rehype-katex": "^7.0.0", "rehype-mathjax": "^6.0.0", - "rehype-pretty-code": "^0.13.0", + "rehype-pretty-code": "^0.13.2", "rehype-raw": "^7.0.0", "rehype-slug": "^6.0.0", "remark": "^15.0.1", @@ -4971,9 +4971,9 @@ } }, "node_modules/rehype-pretty-code": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/rehype-pretty-code/-/rehype-pretty-code-0.13.0.tgz", - "integrity": "sha512-+22dz1StXlF7dlMyOySNaVxgcGhMI4BCxq0JxJJPWYGiKsI6cu5jyuIKGHXHvH18D8sv1rdKtvsY9UEfN3++SQ==", + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/rehype-pretty-code/-/rehype-pretty-code-0.13.2.tgz", + "integrity": "sha512-F+PaFMscfJOcSHcR2b//+hk/0jT56hmGDqXcVD6VC9j0CUSGiqv8YxaWUyhR7qEIRRSbzAVxx+0uxzk+akXs+w==", "dependencies": { "@types/hast": "^3.0.4", "hast-util-to-string": "^3.0.0", @@ -4986,7 +4986,7 @@ "node": ">=18" }, "peerDependencies": { - "shiki": "^1.0.0" + "shiki": "^1.3.0" } }, "node_modules/rehype-raw": { diff --git a/package.json b/package.json index aa6e35d..2b495a7 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "rehype-citation": "^2.0.0", "rehype-katex": "^7.0.0", "rehype-mathjax": "^6.0.0", - "rehype-pretty-code": "^0.13.0", + "rehype-pretty-code": "^0.13.2", "rehype-raw": "^7.0.0", "rehype-slug": "^6.0.0", "remark": "^15.0.1", From 688c5484a9d9146214d4259745b70dc0dd0fedc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 18:16:34 -0400 Subject: [PATCH 23/49] chore(deps-dev): bump tsx from 4.11.0 to 4.11.2 (#1183) Bumps [tsx](https://github.com/privatenumber/tsx) from 4.11.0 to 4.11.2. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.11.0...v4.11.2) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 04edeae..d9e7d6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -81,7 +81,7 @@ "@types/yargs": "^17.0.32", "esbuild": "^0.19.9", "prettier": "^3.2.4", - "tsx": "^4.11.0", + "tsx": "^4.11.2", "typescript": "^5.4.5" }, "engines": { @@ -5903,9 +5903,9 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsx": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.11.0.tgz", - "integrity": "sha512-vzGGELOgAupsNVssAmZjbUDfdm/pWP4R+Kg8TVdsonxbXk0bEpE1qh0yV6/QxUVXaVlNemgcPajGdJJ82n3stg==", + "version": "4.11.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.11.2.tgz", + "integrity": "sha512-V5DL5v1BuItjsQ2FN9+4OjR7n5cr8hSgN+VGmm/fd2/0cgQdBIWHcQ3bFYm/5ZTmyxkTDBUIaRuW2divgfPe0A==", "dev": true, "dependencies": { "esbuild": "~0.20.2", diff --git a/package.json b/package.json index 2b495a7..5ae9d8b 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "@types/yargs": "^17.0.32", "esbuild": "^0.19.9", "prettier": "^3.2.4", - "tsx": "^4.11.0", + "tsx": "^4.11.2", "typescript": "^5.4.5" } } From 3968b850c2518f7b303adcc9e966a079423abde5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 13:57:08 -0700 Subject: [PATCH 24/49] chore(deps): bump @floating-ui/dom from 1.6.3 to 1.6.5 (#1196) Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.3 to 1.6.5. - [Release notes](https://github.com/floating-ui/floating-ui/releases) - [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md) - [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.6.5/packages/dom) --- updated-dependencies: - dependency-name: "@floating-ui/dom" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index d9e7d6c..f180b7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@clack/prompts": "^0.7.0", - "@floating-ui/dom": "^1.6.3", + "@floating-ui/dom": "^1.6.5", "@napi-rs/simple-git": "0.1.16", "async-mutex": "^0.5.0", "chalk": "^5.3.0", @@ -563,9 +563,9 @@ } }, "node_modules/@floating-ui/dom": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.3.tgz", - "integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==", + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.5.tgz", + "integrity": "sha512-Nsdud2X65Dz+1RHjAIP0t8z5e2ff/IRbei6BqFrl1urT8sDVzM1HMQ+R0XcU5ceRfyO3I6ayeqIfh+6Wb8LGTw==", "dependencies": { "@floating-ui/core": "^1.0.0", "@floating-ui/utils": "^0.2.0" diff --git a/package.json b/package.json index 5ae9d8b..1603093 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "@clack/prompts": "^0.7.0", - "@floating-ui/dom": "^1.6.3", + "@floating-ui/dom": "^1.6.5", "@napi-rs/simple-git": "0.1.16", "async-mutex": "^0.5.0", "chalk": "^5.3.0", From 903271748677dbb398b1a2db4640e01501a60e03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 09:31:50 -0700 Subject: [PATCH 25/49] chore(deps): bump preact from 10.20.1 to 10.22.0 (#1195) Bumps [preact](https://github.com/preactjs/preact) from 10.20.1 to 10.22.0. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](https://github.com/preactjs/preact/compare/10.20.1...10.22.0) --- updated-dependencies: - dependency-name: preact dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index f180b7f..a0af7a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "mdast-util-to-hast": "^13.1.0", "mdast-util-to-string": "^4.0.0", "micromorph": "^0.4.5", - "preact": "^10.20.1", + "preact": "^10.22.0", "preact-render-to-string": "^6.4.2", "pretty-bytes": "^6.1.1", "pretty-time": "^1.1.0", @@ -4696,9 +4696,9 @@ } }, "node_modules/preact": { - "version": "10.20.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.20.1.tgz", - "integrity": "sha512-JIFjgFg9B2qnOoGiYMVBtrcFxHqn+dNXbq76bVmcaHYJFYR4lW67AOcXgAYQQTDYXDOg/kTZrKPNCdRgJ2UJmw==", + "version": "10.22.0", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.22.0.tgz", + "integrity": "sha512-RRurnSjJPj4rp5K6XoP45Ui33ncb7e4H7WiOHVpjbkvqvA3U+N8Z6Qbo0AE6leGYBV66n8EhEaFixvIu3SkxFw==", "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" diff --git a/package.json b/package.json index 1603093..a2b49f4 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "mdast-util-to-hast": "^13.1.0", "mdast-util-to-string": "^4.0.0", "micromorph": "^0.4.5", - "preact": "^10.20.1", + "preact": "^10.22.0", "preact-render-to-string": "^6.4.2", "pretty-bytes": "^6.1.1", "pretty-time": "^1.1.0", From 63d51a8cc54f5cae5844a90fcecea0f7e45228b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 09:34:36 -0700 Subject: [PATCH 26/49] chore(deps): bump preact-render-to-string from 6.4.2 to 6.5.4 (#1198) Bumps [preact-render-to-string](https://github.com/preactjs/preact-render-to-string) from 6.4.2 to 6.5.4. - [Release notes](https://github.com/preactjs/preact-render-to-string/releases) - [Changelog](https://github.com/preactjs/preact-render-to-string/blob/main/CHANGELOG.md) - [Commits](https://github.com/preactjs/preact-render-to-string/compare/v6.4.2...v6.5.4) --- updated-dependencies: - dependency-name: preact-render-to-string dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 16 ++++------------ package.json | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index a0af7a0..14f159a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ "mdast-util-to-string": "^4.0.0", "micromorph": "^0.4.5", "preact": "^10.22.0", - "preact-render-to-string": "^6.4.2", + "preact-render-to-string": "^6.5.4", "pretty-bytes": "^6.1.1", "pretty-time": "^1.1.0", "reading-time": "^1.5.0", @@ -4705,12 +4705,9 @@ } }, "node_modules/preact-render-to-string": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.4.2.tgz", - "integrity": "sha512-Sio5SvlyZSAXHuvnMgYzVQd67lNIuQe4uSjJ+2gfpJNC6L8zoHQR5xV7B/EjIqrAYWVyJ2eACkTCxVrIzZi6Vw==", - "dependencies": { - "pretty-format": "^3.8.0" - }, + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.5.4.tgz", + "integrity": "sha512-06s0E3cEMLoXQznmtJ/K/xbFs3uwo52Qpgf8lzbe+VbF/XzwJ0LxZGtVLZekhaEeC39+W1MEf05F4lUikzPnxA==", "peerDependencies": { "preact": ">=10" } @@ -4741,11 +4738,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pretty-format": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", - "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==" - }, "node_modules/pretty-time": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz", diff --git a/package.json b/package.json index a2b49f4..e9fea19 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "mdast-util-to-string": "^4.0.0", "micromorph": "^0.4.5", "preact": "^10.22.0", - "preact-render-to-string": "^6.4.2", + "preact-render-to-string": "^6.5.4", "pretty-bytes": "^6.1.1", "pretty-time": "^1.1.0", "reading-time": "^1.5.0", From 0472daa00313b587de5e75b7a877db3e16025034 Mon Sep 17 00:00:00 2001 From: Leo Lazou Date: Wed, 12 Jun 2024 18:39:49 +0200 Subject: [PATCH 27/49] homepage coloured as visited in the Graph (#1128) simplifies slug from FullSlug to SimpleSlug before storing it in the visited pages list in memory this leads to "index" page and "folder/index", "tags/tag/index" being stored a "/", "folder/" and "tags/tag/" respectively in the list of visited pages. this ensures that the homepage is rightfully coloured as a visited page in the "color" function of the graph --- quartz/components/scripts/graph.inline.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz/components/scripts/graph.inline.ts b/quartz/components/scripts/graph.inline.ts index 15a9a06..1a4140b 100644 --- a/quartz/components/scripts/graph.inline.ts +++ b/quartz/components/scripts/graph.inline.ts @@ -361,7 +361,7 @@ function renderGlobalGraph() { document.addEventListener("nav", async (e: CustomEventMap["nav"]) => { const slug = e.detail.url - addToVisited(slug) + addToVisited(simplifySlug(slug)) await renderGraph("graph-container", slug) const containerIcon = document.getElementById("global-graph-icon") From 19e127f6ad285af744b9d7db898a25b362a9a630 Mon Sep 17 00:00:00 2001 From: x4dr Date: Thu, 13 Jun 2024 18:38:48 +0200 Subject: [PATCH 28/49] fix DOMLoaded in code examples (#1204) --- docs/advanced/creating components.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/advanced/creating components.md b/docs/advanced/creating components.md index 27369ab..628d5aa 100644 --- a/docs/advanced/creating components.md +++ b/docs/advanced/creating components.md @@ -129,11 +129,11 @@ export default (() => { return } - YourComponent.beforeDOM = ` + YourComponent.beforeDOMLoaded = ` console.log("hello from before the page loads!") ` - YourComponent.afterDOM = ` + YourComponent.afterDOMLoaded = ` document.getElementById('btn').onclick = () => { alert('button clicked!') } @@ -180,7 +180,7 @@ export default (() => { return } - YourComponent.afterDOM = script + YourComponent.afterDOMLoaded = script return YourComponent }) satisfies QuartzComponentConstructor ``` From a12d76afdb51e0de3adf5fdaef63e5f20077ff97 Mon Sep 17 00:00:00 2001 From: Callum Barker <64287849+cbarkr@users.noreply.github.com> Date: Thu, 13 Jun 2024 12:47:22 -0700 Subject: [PATCH 29/49] fix: fix explorer view gradient positioning on mobile (fixes #906) (#1206) --- quartz/styles/base.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/quartz/styles/base.scss b/quartz/styles/base.scss index 859bb43..a7c1b45 100644 --- a/quartz/styles/base.scss +++ b/quartz/styles/base.scss @@ -485,6 +485,7 @@ ul.overflow, ol.overflow { max-height: 400; overflow-y: auto; + position: relative; // clearfix content: ""; From 81d00fc9c003a37033e0c0d92333801fa94d0633 Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Fri, 14 Jun 2024 01:02:00 +0200 Subject: [PATCH 30/49] .callout-content support (#1188) * .callout-content support * Use BlockContent | FootnoteContent for callout body * Update quartz/plugins/transformers/ofm.ts Co-authored-by: Jacky Zhao * Refactor * Combine child selectors * Fix multiple callout members * Empty check * Replace splice --------- Co-authored-by: Jacky Zhao --- quartz/plugins/transformers/ofm.ts | 19 +++++++++++++++++-- quartz/styles/callouts.scss | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index 414d8f6..708fe5e 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -414,8 +414,8 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin return } - // find first line - const firstChild = node.children[0] + // find first line and callout content + const [firstChild, ...calloutContent] = node.children if (firstChild.type !== "paragraph" || firstChild.children[0]?.type !== "text") { return } @@ -492,6 +492,21 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin "data-callout-metadata": calloutMetaData, }, } + + // Add callout-content class to callout body if it has one. + if (calloutContent.length > 0) { + const contentData: BlockContent | DefinitionContent = { + data: { + hProperties: { + className: "callout-content", + }, + hName: "div", + }, + type: "blockquote", + children: [...calloutContent], + } + node.children = [node.children[0], contentData] + } } }) } diff --git a/quartz/styles/callouts.scss b/quartz/styles/callouts.scss index b1fd180..d6f65aa 100644 --- a/quartz/styles/callouts.scss +++ b/quartz/styles/callouts.scss @@ -10,7 +10,7 @@ transition: max-height 0.3s ease; box-sizing: border-box; - & > *:nth-child(2) { + & > .callout-content > :first-child { margin-top: 0; } From 3e14b2b89b60610eb3ae57603a451f1435ea45c0 Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Fri, 14 Jun 2024 18:17:46 +0200 Subject: [PATCH 31/49] fix(wikilinks): pdf page linking (#1207) --- quartz/plugins/transformers/ofm.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index 708fe5e..925d21e 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -6,6 +6,7 @@ import { slug as slugAnchor } from "github-slugger" import rehypeRaw from "rehype-raw" import { SKIP, visit } from "unist-util-visit" import path from "path" +import { splitAnchor } from "../../util/path" import { JSResource } from "../../util/resources" // @ts-ignore import calloutScript from "../../components/scripts/callout.inline.ts" @@ -199,10 +200,9 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin src = src.replace(wikilinkRegex, (value, ...capture) => { const [rawFp, rawHeader, rawAlias]: (string | undefined)[] = capture - const fp = rawFp ?? "" - const anchor = rawHeader?.trim().replace(/^#+/, "") + const [fp, anchor] = splitAnchor(`${rawFp ?? ""}${rawHeader ?? ""}`) const blockRef = Boolean(anchor?.startsWith("^")) ? "^" : "" - const displayAnchor = anchor ? `#${blockRef}${slugAnchor(anchor)}` : "" + const displayAnchor = anchor ? `#${blockRef}${anchor.trim().replace(/^#+/, "")}` : "" const displayAlias = rawAlias ?? rawHeader?.replace("#", "|") ?? "" const embedDisplay = value.startsWith("!") ? "!" : "" From 42640bceb57c450d5c2427bd2b449827468d0ede Mon Sep 17 00:00:00 2001 From: Paul Trotter Date: Mon, 17 Jun 2024 00:33:28 -0500 Subject: [PATCH 32/49] Check link isExternal before adding target="_blank" (#1211) Fixes #1186 openLinksInNewTab opens ALL links in new tabs. Fixed to reflect documented behavior here: https://quartz.jzhao.xyz/plugins/CrawlLinks --- quartz/plugins/transformers/links.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz/plugins/transformers/links.ts b/quartz/plugins/transformers/links.ts index f89d367..2805818 100644 --- a/quartz/plugins/transformers/links.ts +++ b/quartz/plugins/transformers/links.ts @@ -93,7 +93,7 @@ export const CrawlLinks: QuartzTransformerPlugin | undefined> = } node.properties.className = classes - if (opts.openLinksInNewTab) { + if (isExternal && opts.openLinksInNewTab) { node.properties.target = "_blank" } From 569ee74633cabcc79e746c5e1fd16bacc9908c07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:33:00 -0700 Subject: [PATCH 33/49] chore(deps): bump workerpool from 9.1.1 to 9.1.2 (#1215) Bumps [workerpool](https://github.com/josdejong/workerpool) from 9.1.1 to 9.1.2. - [Changelog](https://github.com/josdejong/workerpool/blob/master/HISTORY.md) - [Commits](https://github.com/josdejong/workerpool/compare/v9.1.1...v9.1.2) --- updated-dependencies: - dependency-name: workerpool dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 14f159a..934c727 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62,7 +62,7 @@ "unified": "^11.0.4", "unist-util-visit": "^5.0.0", "vfile": "^6.0.1", - "workerpool": "^9.1.1", + "workerpool": "^9.1.2", "ws": "^8.17.0", "yargs": "^17.7.2" }, @@ -6723,9 +6723,9 @@ "integrity": "sha512-Gd9+TUn5nXdwj/hFsPVx5cuHHiF5Bwuc30jZ4+ronF1qHK5O7HD0sgmXWSEgwKquT3ClLoKPVbO6qGwVwLzvAw==" }, "node_modules/workerpool": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.1.1.tgz", - "integrity": "sha512-EFoFTSEo9m4V4wNrwzVRjxnf/E/oBpOzcI/R5CIugJhl9RsCiq525rszo4AtqcjQQoqFdu2E3H82AnbtpaQHvg==" + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.1.2.tgz", + "integrity": "sha512-5wZwyy5lcqrakQQcjaYQgVCbMR3djwIFWXuD2EGk/o/9bL3bd2kRGNwF74Bhcf1CIkAIwoOMG82EVnA5JmVVNw==" }, "node_modules/wrap-ansi": { "version": "8.1.0", diff --git a/package.json b/package.json index e9fea19..aaf74ab 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "unified": "^11.0.4", "unist-util-visit": "^5.0.0", "vfile": "^6.0.1", - "workerpool": "^9.1.1", + "workerpool": "^9.1.2", "ws": "^8.17.0", "yargs": "^17.7.2" }, From 3cb9392a7a526bc54db655bc108020c5212857bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:34:45 -0700 Subject: [PATCH 34/49] chore(deps): bump preact-render-to-string from 6.5.4 to 6.5.5 (#1214) Bumps [preact-render-to-string](https://github.com/preactjs/preact-render-to-string) from 6.5.4 to 6.5.5. - [Release notes](https://github.com/preactjs/preact-render-to-string/releases) - [Changelog](https://github.com/preactjs/preact-render-to-string/blob/main/CHANGELOG.md) - [Commits](https://github.com/preactjs/preact-render-to-string/compare/v6.5.4...v6.5.5) --- updated-dependencies: - dependency-name: preact-render-to-string dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 934c727..c94aa12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ "mdast-util-to-string": "^4.0.0", "micromorph": "^0.4.5", "preact": "^10.22.0", - "preact-render-to-string": "^6.5.4", + "preact-render-to-string": "^6.5.5", "pretty-bytes": "^6.1.1", "pretty-time": "^1.1.0", "reading-time": "^1.5.0", @@ -4705,9 +4705,9 @@ } }, "node_modules/preact-render-to-string": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.5.4.tgz", - "integrity": "sha512-06s0E3cEMLoXQznmtJ/K/xbFs3uwo52Qpgf8lzbe+VbF/XzwJ0LxZGtVLZekhaEeC39+W1MEf05F4lUikzPnxA==", + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.5.5.tgz", + "integrity": "sha512-KiMFTKNTmT/ccE79BURR/r6XRc2I2TCTZ0MpeWqHW2XnllbeghXvwGsdAfF/MzMilUcTfODtSmMxgoRFL9TM5g==", "peerDependencies": { "preact": ">=10" } diff --git a/package.json b/package.json index aaf74ab..da3ad40 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "mdast-util-to-string": "^4.0.0", "micromorph": "^0.4.5", "preact": "^10.22.0", - "preact-render-to-string": "^6.5.4", + "preact-render-to-string": "^6.5.5", "pretty-bytes": "^6.1.1", "pretty-time": "^1.1.0", "reading-time": "^1.5.0", From 0a3be96dd6098026edc23a7f66029484c1e44551 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:37:04 -0700 Subject: [PATCH 35/49] chore(deps): bump ws from 8.17.0 to 8.17.1 (#1213) Bumps [ws](https://github.com/websockets/ws) from 8.17.0 to 8.17.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.17.0...8.17.1) --- updated-dependencies: - dependency-name: ws dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index c94aa12..58ee1ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,7 +63,7 @@ "unist-util-visit": "^5.0.0", "vfile": "^6.0.1", "workerpool": "^9.1.2", - "ws": "^8.17.0", + "ws": "^8.17.1", "yargs": "^17.7.2" }, "bin": { @@ -6809,9 +6809,9 @@ } }, "node_modules/ws": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", - "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "engines": { "node": ">=10.0.0" }, diff --git a/package.json b/package.json index da3ad40..05925f3 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "unist-util-visit": "^5.0.0", "vfile": "^6.0.1", "workerpool": "^9.1.2", - "ws": "^8.17.0", + "ws": "^8.17.1", "yargs": "^17.7.2" }, "devDependencies": { From 541b470cfc85c342ba8b7548d58d668b49d8dd85 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Mon, 17 Jun 2024 21:33:53 -0700 Subject: [PATCH 36/49] fix: overflow fade for good (closes #1218) --- quartz/styles/base.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quartz/styles/base.scss b/quartz/styles/base.scss index a7c1b45..b023b27 100644 --- a/quartz/styles/base.scss +++ b/quartz/styles/base.scss @@ -481,11 +481,14 @@ video { flex: 1 1 auto; } +div:has(> .overflow) { + position: relative; +} + ul.overflow, ol.overflow { max-height: 400; overflow-y: auto; - position: relative; // clearfix content: ""; From 265faef4e8717eab9678a5515ca9150b7776b148 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Mon, 17 Jun 2024 21:43:32 -0700 Subject: [PATCH 37/49] fix: properly compute relative path for explorer (closes #1055, #1066) --- quartz/components/ExplorerNode.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/quartz/components/ExplorerNode.tsx b/quartz/components/ExplorerNode.tsx index 2968a03..e57d677 100644 --- a/quartz/components/ExplorerNode.tsx +++ b/quartz/components/ExplorerNode.tsx @@ -168,10 +168,8 @@ export function ExplorerNode({ node, opts, fullPath, fileData }: ExplorerNodePro const isDefaultOpen = opts.folderDefaultState === "open" // Calculate current folderPath - let folderPath = "" - if (node.name !== "") { - folderPath = joinSegments(fullPath ?? "", node.name) - } + const folderPath = node.name !== "" ? joinSegments(fullPath ?? "", node.name) : "" + const href = resolveRelative(fileData.slug!, folderPath as SimpleSlug) + "/" return ( <> @@ -205,11 +203,7 @@ export function ExplorerNode({ node, opts, fullPath, fileData }: ExplorerNodePro {/* render tag if folderBehavior is "link", otherwise render