From e865462db7ea3c0f405f536ea598001badabd351 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 22 Oct 2024 12:47:54 +0000 Subject: [PATCH 01/16] chore (update): fetch submodule --- content | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content b/content index 27b23965f..2338ee5d1 160000 --- a/content +++ b/content @@ -1 +1 @@ -Subproject commit 27b23965f60a8eed331e6e6fee7c75cc8811a813 +Subproject commit 2338ee5d17200d5ab2e9a2a81e599caadc82270c From ad52d095670f2a08a330d1d4ee5ed4bc784e65aa Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Tue, 22 Oct 2024 20:33:54 +0000 Subject: [PATCH 02/16] Feat(filters): Support "true" as valid for draft and publish frontmatter values (b3a02909ba74fff08cd3675707d1f4d782a24e98) --- quartz/plugins/filters/draft.ts | 3 ++- quartz/plugins/filters/explicit.ts | 2 +- quartz/plugins/transformers/frontmatter.ts | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/quartz/plugins/filters/draft.ts b/quartz/plugins/filters/draft.ts index 09a3c3a84..e8f1d4eea 100644 --- a/quartz/plugins/filters/draft.ts +++ b/quartz/plugins/filters/draft.ts @@ -3,7 +3,8 @@ import { QuartzFilterPlugin } from "../types" export const RemoveDrafts: QuartzFilterPlugin<{}> = () => ({ name: "RemoveDrafts", shouldPublish(_ctx, [_tree, vfile]) { - const draftFlag: boolean = vfile.data?.frontmatter?.draft === true + const draftFlag: boolean = + vfile.data?.frontmatter?.draft === true || vfile.data?.frontmatter?.draft === "true" return !draftFlag }, }) diff --git a/quartz/plugins/filters/explicit.ts b/quartz/plugins/filters/explicit.ts index 603b46d6b..e2558e827 100644 --- a/quartz/plugins/filters/explicit.ts +++ b/quartz/plugins/filters/explicit.ts @@ -3,6 +3,6 @@ import { QuartzFilterPlugin } from "../types" export const ExplicitPublish: QuartzFilterPlugin = () => ({ name: "ExplicitPublish", shouldPublish(_ctx, [_tree, vfile]) { - return vfile.data?.frontmatter?.publish === true + return vfile.data?.frontmatter?.publish === true || vfile.data?.frontmatter?.publish === "true" }, }) diff --git a/quartz/plugins/transformers/frontmatter.ts b/quartz/plugins/transformers/frontmatter.ts index 70a60d8b5..2e599aa0e 100644 --- a/quartz/plugins/transformers/frontmatter.ts +++ b/quartz/plugins/transformers/frontmatter.ts @@ -88,8 +88,8 @@ declare module "vfile" { tags: string[] aliases: string[] description: string - publish: boolean - draft: boolean + publish: boolean | string + draft: boolean | string lang: string enableToc: string cssclasses: string[] From 3ef2a24f4b976021ddef5936e81fa48f2efa7177 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:54:41 -0400 Subject: [PATCH 03/16] chore(deps): bump the production-dependencies group across 1 directory with 7 updates (#1540) --- package-lock.json | 78 +++++++++++++++++++---------------------------- package.json | 14 ++++----- 2 files changed, 39 insertions(+), 53 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1898a462a..18349a5eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "globby": "^14.0.2", "gray-matter": "^4.0.3", "hast-util-to-html": "^9.0.3", - "hast-util-to-jsx-runtime": "^2.3.0", + "hast-util-to-jsx-runtime": "^2.3.2", "hast-util-to-string": "^3.0.1", "is-absolute-url": "^4.0.1", "js-yaml": "^4.1.0", @@ -33,14 +33,14 @@ "mdast-util-to-hast": "^13.2.0", "mdast-util-to-string": "^4.0.0", "micromorph": "^0.4.5", - "pixi.js": "^8.4.1", - "preact": "^10.24.2", + "pixi.js": "^8.5.1", + "preact": "^10.24.3", "preact-render-to-string": "^6.5.11", "pretty-bytes": "^6.1.1", "pretty-time": "^1.1.0", "reading-time": "^1.5.0", "rehype-autolink-headings": "^7.1.0", - "rehype-citation": "^2.1.2", + "rehype-citation": "^2.2.0", "rehype-katex": "^7.0.1", "rehype-mathjax": "^6.0.0", "rehype-pretty-code": "^0.14.0", @@ -56,7 +56,7 @@ "remark-smartypants": "^3.0.2", "rfdc": "^1.4.1", "rimraf": "^6.0.1", - "serve-handler": "^6.1.5", + "serve-handler": "^6.1.6", "shiki": "^1.22.0", "source-map-support": "^0.5.21", "to-vfile": "^8.0.0", @@ -64,7 +64,7 @@ "unified": "^11.0.5", "unist-util-visit": "^5.0.0", "vfile": "^6.0.3", - "workerpool": "^9.1.3", + "workerpool": "^9.2.0", "ws": "^8.18.0", "yargs": "^17.7.2" }, @@ -76,7 +76,7 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.7.5", + "@types/node": "^22.7.7", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.5.12", @@ -1307,9 +1307,9 @@ } }, "node_modules/@types/node": { - "version": "22.7.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", - "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", + "version": "22.7.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.7.tgz", + "integrity": "sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q==", "dev": true, "dependencies": { "undici-types": "~6.19.2" @@ -2441,14 +2441,6 @@ "node": ">=8.6.0" } }, - "node_modules/fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", - "dependencies": { - "punycode": "^1.3.2" - } - }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -2913,9 +2905,9 @@ "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" }, "node_modules/hast-util-to-jsx-runtime": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.0.tgz", - "integrity": "sha512-H/y0+IWPdsLLS738P8tDnrQ8Z+dj12zQQ6WC11TIM21C8WFVoIxcqWXf2H3hiTVZjF1AWqoimGwrTWecWrnmRQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.2.tgz", + "integrity": "sha512-1ngXYb+V9UT5h+PxNRa1O1FYguZK/XL+gkeqvp7EdHlB9oHUG0eYRo/vY5inBdcqo3RkPMC58/H94HvkbfGdyg==", "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", @@ -4854,9 +4846,9 @@ } }, "node_modules/path-to-regexp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", - "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==" }, "node_modules/path-type": { "version": "5.0.0", @@ -4886,9 +4878,9 @@ } }, "node_modules/pixi.js": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.4.1.tgz", - "integrity": "sha512-3ZbEIkLYYi602UB5wuN7kPz3VsGHoJa6nxD8ustvMLRySxHAR9Z8tCAYY8ISgNplpPbaDw03B0yTD4/k9f6cAQ==", + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.5.1.tgz", + "integrity": "sha512-yYj8tWehUfH7or/34gf17XyZGnyjiG8toMH8oy9gP+4GjLK+/WjFLlRqaP0AECB8XGF8AJxgkS5y2aMDHqx11A==", "dependencies": { "@pixi/colord": "^2.9.6", "@types/css-font-loading-module": "^0.0.12", @@ -4902,9 +4894,9 @@ } }, "node_modules/preact": { - "version": "10.24.2", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.24.2.tgz", - "integrity": "sha512-1cSoF0aCC8uaARATfrlz4VCBqE8LwZwRfLgkxJOQwAlQt6ayTmi0D9OF7nXid1POI5SZidFuG9CnlXbDfLqY/Q==", + "version": "10.24.3", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.24.3.tgz", + "integrity": "sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==", "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -4966,11 +4958,6 @@ "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, - "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" - }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -5043,9 +5030,9 @@ } }, "node_modules/rehype-citation": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/rehype-citation/-/rehype-citation-2.1.2.tgz", - "integrity": "sha512-n7jx9TqJLWX7MYYt+c6JRZtubUv+FNdoxbrtD0CL/0LCLeTxwvnbJOMJKVzCFNhDdDQ0uInRMK3EWuo6HZuSEQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/rehype-citation/-/rehype-citation-2.2.0.tgz", + "integrity": "sha512-alEc/TxDqyALcHt9/MXUBjrCLl+It3q3gqkX0gGv6k3nyJm7CUAOOYxuywWyu6Cljf8DZFCJ9u+oVV/nRgRyYQ==", "dependencies": { "@citation-js/core": "^0.7.14", "@citation-js/date": "^0.5.1", @@ -5952,17 +5939,16 @@ } }, "node_modules/serve-handler": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.5.tgz", - "integrity": "sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==", + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.6.tgz", + "integrity": "sha512-x5RL9Y2p5+Sh3D38Fh9i/iQ5ZK+e4xuXRd/pGbM4D13tgo/MGwbttUk8emytcr1YYzBYs+apnUngBDFYfpjPuQ==", "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", - "fast-url-parser": "1.1.3", "mime-types": "2.1.18", "minimatch": "3.1.2", "path-is-inside": "1.0.2", - "path-to-regexp": "2.2.1", + "path-to-regexp": "3.3.0", "range-parser": "1.2.0" } }, @@ -7143,9 +7129,9 @@ "integrity": "sha512-Gd9+TUn5nXdwj/hFsPVx5cuHHiF5Bwuc30jZ4+ronF1qHK5O7HD0sgmXWSEgwKquT3ClLoKPVbO6qGwVwLzvAw==" }, "node_modules/workerpool": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.1.3.tgz", - "integrity": "sha512-LhUrk4tbxJRDQmRrrFWA9EnboXI79fe0ZNTy3u8m+dqPN1EkVSIsQYAB8OF/fkyhG8Rtup+c/bzj/+bzbG8fqg==" + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.2.0.tgz", + "integrity": "sha512-PKZqBOCo6CYkVOwAxWxQaSF2Fvb5Iv2fCeTP7buyWI2GiynWr46NcXSgK/idoV6e60dgCBfgYc+Un3HMvmqP8w==" }, "node_modules/wrap-ansi": { "version": "8.1.0", diff --git a/package.json b/package.json index 415fc68b6..9423e09db 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "globby": "^14.0.2", "gray-matter": "^4.0.3", "hast-util-to-html": "^9.0.3", - "hast-util-to-jsx-runtime": "^2.3.0", + "hast-util-to-jsx-runtime": "^2.3.2", "hast-util-to-string": "^3.0.1", "is-absolute-url": "^4.0.1", "js-yaml": "^4.1.0", @@ -59,14 +59,14 @@ "mdast-util-to-hast": "^13.2.0", "mdast-util-to-string": "^4.0.0", "micromorph": "^0.4.5", - "pixi.js": "^8.4.1", - "preact": "^10.24.2", + "pixi.js": "^8.5.1", + "preact": "^10.24.3", "preact-render-to-string": "^6.5.11", "pretty-bytes": "^6.1.1", "pretty-time": "^1.1.0", "reading-time": "^1.5.0", "rehype-autolink-headings": "^7.1.0", - "rehype-citation": "^2.1.2", + "rehype-citation": "^2.2.0", "rehype-katex": "^7.0.1", "rehype-mathjax": "^6.0.0", "rehype-pretty-code": "^0.14.0", @@ -82,7 +82,7 @@ "remark-smartypants": "^3.0.2", "rfdc": "^1.4.1", "rimraf": "^6.0.1", - "serve-handler": "^6.1.5", + "serve-handler": "^6.1.6", "shiki": "^1.22.0", "source-map-support": "^0.5.21", "to-vfile": "^8.0.0", @@ -90,7 +90,7 @@ "unified": "^11.0.5", "unist-util-visit": "^5.0.0", "vfile": "^6.0.3", - "workerpool": "^9.1.3", + "workerpool": "^9.2.0", "ws": "^8.18.0", "yargs": "^17.7.2" }, @@ -99,7 +99,7 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.7.5", + "@types/node": "^22.7.7", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.5.12", From 1d2dc167f4397e230092cc867889a86734343cfc Mon Sep 17 00:00:00 2001 From: Thomas Hack <39602241+tha00@users.noreply.github.com> Date: Fri, 25 Oct 2024 18:52:33 +0200 Subject: [PATCH 04/16] feat(folder): add intermediate folders pages (#1295) Co-authored-by: Aaron Pham Co-authored-by: Aaron Pham --- quartz/components/pages/FolderContent.tsx | 46 ++++++++++++++++++++--- quartz/plugins/emitters/folderPage.tsx | 22 ++++++++--- 2 files changed, 57 insertions(+), 11 deletions(-) diff --git a/quartz/components/pages/FolderContent.tsx b/quartz/components/pages/FolderContent.tsx index dc216cde7..7a49d494f 100644 --- a/quartz/components/pages/FolderContent.tsx +++ b/quartz/components/pages/FolderContent.tsx @@ -2,22 +2,25 @@ import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } fro import path from "path" import style from "../styles/listPage.scss" -import { PageList, SortFn } from "../PageList" -import { stripSlashes, simplifySlug } from "../../util/path" +import { byDateAndAlphabetical, PageList, SortFn } from "../PageList" +import { stripSlashes, simplifySlug, joinSegments, FullSlug } from "../../util/path" import { Root } from "hast" import { htmlToJsx } from "../../util/jsx" import { i18n } from "../../i18n" +import { QuartzPluginData } from "../../plugins/vfile" interface FolderContentOptions { /** * Whether to display number of folders */ showFolderCount: boolean + showSubfolders: boolean sort?: SortFn } const defaultOptions: FolderContentOptions = { showFolderCount: true, + showSubfolders: true, } export default ((opts?: Partial) => { @@ -26,14 +29,47 @@ export default ((opts?: Partial) => { const FolderContent: QuartzComponent = (props: QuartzComponentProps) => { const { tree, fileData, allFiles, cfg } = props const folderSlug = stripSlashes(simplifySlug(fileData.slug!)) - const allPagesInFolder = allFiles.filter((file) => { + const folderParts = folderSlug.split(path.posix.sep) + + const allPagesInFolder: QuartzPluginData[] = [] + const allPagesInSubfolders: Map = new Map() + + allFiles.forEach((file) => { const fileSlug = stripSlashes(simplifySlug(file.slug!)) const prefixed = fileSlug.startsWith(folderSlug) && fileSlug !== folderSlug - const folderParts = folderSlug.split(path.posix.sep) const fileParts = fileSlug.split(path.posix.sep) const isDirectChild = fileParts.length === folderParts.length + 1 - return prefixed && isDirectChild + + if (!prefixed) { + return + } + + if (isDirectChild) { + allPagesInFolder.push(file) + } else if (options.showSubfolders) { + const subfolderSlug = joinSegments( + ...fileParts.slice(0, folderParts.length + 1), + ) as FullSlug + const pagesInFolder = allPagesInSubfolders.get(subfolderSlug) || [] + allPagesInSubfolders.set(subfolderSlug, [...pagesInFolder, file]) + } }) + + allPagesInSubfolders.forEach((files, subfolderSlug) => { + const hasIndex = allPagesInFolder.some( + (file) => subfolderSlug === stripSlashes(simplifySlug(file.slug!)), + ) + if (!hasIndex) { + const subfolderDates = files.sort(byDateAndAlphabetical(cfg))[0].dates + const subfolderTitle = subfolderSlug.split(path.posix.sep).at(-1)! + allPagesInFolder.push({ + slug: subfolderSlug, + dates: subfolderDates, + frontmatter: { title: subfolderTitle, tags: ["folder"] }, + }) + } + }) + const cssClasses: string[] = fileData.frontmatter?.cssclasses ?? [] const classes = ["popover-hint", ...cssClasses].join(" ") const listProps = { diff --git a/quartz/plugins/emitters/folderPage.tsx b/quartz/plugins/emitters/folderPage.tsx index 7eebb21c7..b6d860272 100644 --- a/quartz/plugins/emitters/folderPage.tsx +++ b/quartz/plugins/emitters/folderPage.tsx @@ -76,12 +76,11 @@ export const FolderPage: QuartzEmitterPlugin> = (user const folders: Set = new Set( allFiles.flatMap((data) => { - const slug = data.slug - const folderName = path.dirname(slug ?? "") as SimpleSlug - if (slug && folderName !== "." && folderName !== "tags") { - return [folderName] - } - return [] + return data.slug + ? _getFolders(data.slug).filter( + (folderName) => folderName !== "." && folderName !== "tags", + ) + : [] }), ) @@ -133,3 +132,14 @@ export const FolderPage: QuartzEmitterPlugin> = (user }, } } + +function _getFolders(slug: FullSlug): SimpleSlug[] { + var folderName = path.dirname(slug ?? "") as SimpleSlug + const parentFolderNames = [folderName] + + while (folderName !== ".") { + folderName = path.dirname(folderName ?? "") as SimpleSlug + parentFolderNames.push(folderName) + } + return parentFolderNames +} From 1915a198d96be134a91441ea52506c455cf8a696 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 20:04:45 -0400 Subject: [PATCH 05/16] chore(deps): bump the production-dependencies group with 5 updates (#1548) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 84 +++++++++++++++++++++++------------------------ package.json | 10 +++--- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/package-lock.json b/package-lock.json index 18349a5eb..7a543fd1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,14 +33,14 @@ "mdast-util-to-hast": "^13.2.0", "mdast-util-to-string": "^4.0.0", "micromorph": "^0.4.5", - "pixi.js": "^8.5.1", + "pixi.js": "^8.5.2", "preact": "^10.24.3", "preact-render-to-string": "^6.5.11", "pretty-bytes": "^6.1.1", "pretty-time": "^1.1.0", "reading-time": "^1.5.0", "rehype-autolink-headings": "^7.1.0", - "rehype-citation": "^2.2.0", + "rehype-citation": "^2.2.1", "rehype-katex": "^7.0.1", "rehype-mathjax": "^6.0.0", "rehype-pretty-code": "^0.14.0", @@ -57,7 +57,7 @@ "rfdc": "^1.4.1", "rimraf": "^6.0.1", "serve-handler": "^6.1.6", - "shiki": "^1.22.0", + "shiki": "^1.22.2", "source-map-support": "^0.5.21", "to-vfile": "^8.0.0", "toml": "^3.0.0", @@ -76,14 +76,14 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.7.7", + "@types/node": "^22.8.1", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.5.12", "@types/yargs": "^17.0.33", "esbuild": "^0.24.0", "prettier": "^3.3.3", - "tsx": "^4.19.1", + "tsx": "^4.19.2", "typescript": "^5.6.3" }, "engines": { @@ -898,41 +898,41 @@ } }, "node_modules/@shikijs/core": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.22.0.tgz", - "integrity": "sha512-S8sMe4q71TJAW+qG93s5VaiihujRK6rqDFqBnxqvga/3LvqHEnxqBIOPkt//IdXVtHkQWKu4nOQNk0uBGicU7Q==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.22.2.tgz", + "integrity": "sha512-bvIQcd8BEeR1yFvOYv6HDiyta2FFVePbzeowf5pPS1avczrPK+cjmaxxh0nx5QzbON7+Sv0sQfQVciO7bN72sg==", "dependencies": { - "@shikijs/engine-javascript": "1.22.0", - "@shikijs/engine-oniguruma": "1.22.0", - "@shikijs/types": "1.22.0", + "@shikijs/engine-javascript": "1.22.2", + "@shikijs/engine-oniguruma": "1.22.2", + "@shikijs/types": "1.22.2", "@shikijs/vscode-textmate": "^9.3.0", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.3" } }, "node_modules/@shikijs/engine-javascript": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.22.0.tgz", - "integrity": "sha512-AeEtF4Gcck2dwBqCFUKYfsCq0s+eEbCEbkUuFou53NZ0sTGnJnJ/05KHQFZxpii5HMXbocV9URYVowOP2wH5kw==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.22.2.tgz", + "integrity": "sha512-iOvql09ql6m+3d1vtvP8fLCVCK7BQD1pJFmHIECsujB0V32BJ0Ab6hxk1ewVSMFA58FI0pR2Had9BKZdyQrxTw==", "dependencies": { - "@shikijs/types": "1.22.0", + "@shikijs/types": "1.22.2", "@shikijs/vscode-textmate": "^9.3.0", "oniguruma-to-js": "0.4.3" } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.22.0.tgz", - "integrity": "sha512-5iBVjhu/DYs1HB0BKsRRFipRrD7rqjxlWTj4F2Pf+nQSPqc3kcyqFFeZXnBMzDf0HdqaFVvhDRAGiYNvyLP+Mw==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.22.2.tgz", + "integrity": "sha512-GIZPAGzQOy56mGvWMoZRPggn0dTlBf1gutV5TdceLCZlFNqWmuc7u+CzD0Gd9vQUTgLbrt0KLzz6FNprqYAxlA==", "dependencies": { - "@shikijs/types": "1.22.0", + "@shikijs/types": "1.22.2", "@shikijs/vscode-textmate": "^9.3.0" } }, "node_modules/@shikijs/types": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.22.0.tgz", - "integrity": "sha512-Fw/Nr7FGFhlQqHfxzZY8Cwtwk5E9nKDUgeLjZgt3UuhcM3yJR9xj3ZGNravZZok8XmEZMiYkSMTPlPkULB8nww==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.22.2.tgz", + "integrity": "sha512-NCWDa6LGZqTuzjsGfXOBWfjS/fDIbDdmVDug+7ykVe1IKT4c1gakrvlfFYp5NhAXH/lyqLM8wsAPo5wNy73Feg==", "dependencies": { "@shikijs/vscode-textmate": "^9.3.0", "@types/hast": "^3.0.4" @@ -1307,12 +1307,12 @@ } }, "node_modules/@types/node": { - "version": "22.7.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.7.tgz", - "integrity": "sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q==", + "version": "22.8.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.1.tgz", + "integrity": "sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==", "dev": true, "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.19.8" } }, "node_modules/@types/pretty-time": { @@ -4878,9 +4878,9 @@ } }, "node_modules/pixi.js": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.5.1.tgz", - "integrity": "sha512-yYj8tWehUfH7or/34gf17XyZGnyjiG8toMH8oy9gP+4GjLK+/WjFLlRqaP0AECB8XGF8AJxgkS5y2aMDHqx11A==", + "version": "8.5.2", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.5.2.tgz", + "integrity": "sha512-TOt9g8ifOj4R9DN9ST1M8t2nvnuhr5oWL5YW9ywFLbnOVgFMDcEz+Xek5Mo8Xr64D+QU3qre3IFgreBlsHxTNw==", "dependencies": { "@pixi/colord": "^2.9.6", "@types/css-font-loading-module": "^0.0.12", @@ -5030,9 +5030,9 @@ } }, "node_modules/rehype-citation": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/rehype-citation/-/rehype-citation-2.2.0.tgz", - "integrity": "sha512-alEc/TxDqyALcHt9/MXUBjrCLl+It3q3gqkX0gGv6k3nyJm7CUAOOYxuywWyu6Cljf8DZFCJ9u+oVV/nRgRyYQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/rehype-citation/-/rehype-citation-2.2.1.tgz", + "integrity": "sha512-8Ybq4W0/FeuXSwTrwpDbsZ9v0X0ZeKxDKyA/9s1EI2GMZLgaowPEkFOyXhOjv7Ud2ntK86AWkove38G4U0dRuQ==", "dependencies": { "@citation-js/core": "^0.7.14", "@citation-js/date": "^0.5.1", @@ -5992,14 +5992,14 @@ } }, "node_modules/shiki": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.22.0.tgz", - "integrity": "sha512-/t5LlhNs+UOKQCYBtl5ZsH/Vclz73GIqT2yQsCBygr8L/ppTdmpL4w3kPLoZJbMKVWtoG77Ue1feOjZfDxvMkw==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.22.2.tgz", + "integrity": "sha512-3IZau0NdGKXhH2bBlUk4w1IHNxPh6A5B2sUpyY+8utLu2j/h1QpFkAaUA1bAMxOWWGtTWcAh531vnS4NJKS/lA==", "dependencies": { - "@shikijs/core": "1.22.0", - "@shikijs/engine-javascript": "1.22.0", - "@shikijs/engine-oniguruma": "1.22.0", - "@shikijs/types": "1.22.0", + "@shikijs/core": "1.22.2", + "@shikijs/engine-javascript": "1.22.2", + "@shikijs/engine-oniguruma": "1.22.2", + "@shikijs/types": "1.22.2", "@shikijs/vscode-textmate": "^9.3.0", "@types/hast": "^3.0.4" } @@ -6344,9 +6344,9 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsx": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", - "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", + "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", "dev": true, "dependencies": { "esbuild": "~0.23.0", diff --git a/package.json b/package.json index 9423e09db..97cde0464 100644 --- a/package.json +++ b/package.json @@ -59,14 +59,14 @@ "mdast-util-to-hast": "^13.2.0", "mdast-util-to-string": "^4.0.0", "micromorph": "^0.4.5", - "pixi.js": "^8.5.1", + "pixi.js": "^8.5.2", "preact": "^10.24.3", "preact-render-to-string": "^6.5.11", "pretty-bytes": "^6.1.1", "pretty-time": "^1.1.0", "reading-time": "^1.5.0", "rehype-autolink-headings": "^7.1.0", - "rehype-citation": "^2.2.0", + "rehype-citation": "^2.2.1", "rehype-katex": "^7.0.1", "rehype-mathjax": "^6.0.0", "rehype-pretty-code": "^0.14.0", @@ -83,7 +83,7 @@ "rfdc": "^1.4.1", "rimraf": "^6.0.1", "serve-handler": "^6.1.6", - "shiki": "^1.22.0", + "shiki": "^1.22.2", "source-map-support": "^0.5.21", "to-vfile": "^8.0.0", "toml": "^3.0.0", @@ -99,14 +99,14 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.7.7", + "@types/node": "^22.8.1", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", "@types/ws": "^8.5.12", "@types/yargs": "^17.0.33", "esbuild": "^0.24.0", "prettier": "^3.3.3", - "tsx": "^4.19.1", + "tsx": "^4.19.2", "typescript": "^5.6.3" } } From a53772bbd1dd2804872ae0e519bedeb2a2fd4287 Mon Sep 17 00:00:00 2001 From: Osman Tunahan ARIKAN <154083945+OsmanTunahan@users.noreply.github.com> Date: Thu, 31 Oct 2024 01:33:22 +0300 Subject: [PATCH 06/16] feat(i18n): add turkish language (#1554) --- quartz/i18n/index.ts | 2 + quartz/i18n/locales/tr-TR.ts | 84 ++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 quartz/i18n/locales/tr-TR.ts diff --git a/quartz/i18n/index.ts b/quartz/i18n/index.ts index 2fba70e16..f328ada8d 100644 --- a/quartz/i18n/index.ts +++ b/quartz/i18n/index.ts @@ -20,6 +20,7 @@ import hu from "./locales/hu-HU" import fa from "./locales/fa-IR" import pl from "./locales/pl-PL" import cs from "./locales/cs-CZ" +import tr from "./locales/tr-TR" export const TRANSLATIONS = { "en-US": enUs, @@ -64,6 +65,7 @@ export const TRANSLATIONS = { "fa-IR": fa, "pl-PL": pl, "cs-CZ": cs, + "tr-TR": tr, } as const export const defaultTranslation = "en-US" diff --git a/quartz/i18n/locales/tr-TR.ts b/quartz/i18n/locales/tr-TR.ts new file mode 100644 index 000000000..a3805d1a9 --- /dev/null +++ b/quartz/i18n/locales/tr-TR.ts @@ -0,0 +1,84 @@ +import { Translation } from "./definition" + +export default { + propertyDefaults: { + title: "İsimsiz", + description: "Herhangi bir açıklama eklenmedi", + }, + components: { + callout: { + note: "Not", + abstract: "Özet", + info: "Bilgi", + todo: "Yapılacaklar", + tip: "İpucu", + success: "Başarılı", + question: "Soru", + warning: "Uyarı", + failure: "Başarısız", + danger: "Tehlike", + bug: "Hata", + example: "Örnek", + quote: "Alıntı", + }, + backlinks: { + title: "Backlinkler", + noBacklinksFound: "Backlink bulunamadı", + }, + themeToggle: { + lightMode: "Açık mod", + darkMode: "Koyu mod", + }, + explorer: { + title: "Gezgin", + }, + footer: { + createdWith: "Şununla oluşturuldu", + }, + graph: { + title: "Grafik Görünümü", + }, + recentNotes: { + title: "Son Notlar", + seeRemainingMore: ({ remaining }) => `${remaining} tane daha gör →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `${targetSlug} sayfasından alıntı`, + linkToOriginal: "Orijinal bağlantı", + }, + search: { + title: "Arama", + searchBarPlaceholder: "Bir şey arayın", + }, + tableOfContents: { + title: "İçindekiler", + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes} dakika okuma süresi`, + }, + }, + pages: { + rss: { + recentNotes: "Son notlar", + lastFewNotes: ({ count }) => `Son ${count} not`, + }, + error: { + title: "Bulunamadı", + notFound: "Bu sayfa ya özel ya da mevcut değil.", + home: "Anasayfaya geri dön", + }, + folderContent: { + folder: "Klasör", + itemsUnderFolder: ({ count }) => + count === 1 ? "Bu klasör altında 1 öğe." : `Bu klasör altındaki ${count} öğe.`, + }, + tagContent: { + tag: "Etiket", + tagIndex: "Etiket Sırası", + itemsUnderTag: ({ count }) => + count === 1 ? "Bu etikete sahip 1 öğe." : `Bu etiket altındaki ${count} öğe.`, + showingFirst: ({ count }) => `İlk ${count} etiket gösteriliyor.`, + totalTags: ({ count }) => `Toplam ${count} adet etiket bulundu.`, + }, + }, +} as const satisfies Translation From 314a88d5c607c3f0cdef6706e4bf84590d60f311 Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Wed, 30 Oct 2024 23:57:39 +0100 Subject: [PATCH 07/16] feat(transformer): allow inline CSS styling (#1551) * feat(transformer): allow inline CSS styling * Updated docs * Default to inline: false * Removed redundant inline: false --- docs/advanced/making plugins.md | 8 +++++--- quartz/components/Head.tsx | 6 ++---- quartz/components/renderPage.tsx | 7 ++++++- quartz/plugins/transformers/latex.ts | 6 ++++-- quartz/util/resources.tsx | 25 ++++++++++++++++++++++++- 5 files changed, 41 insertions(+), 11 deletions(-) diff --git a/docs/advanced/making plugins.md b/docs/advanced/making plugins.md index 0ba29680c..9925d16c9 100644 --- a/docs/advanced/making plugins.md +++ b/docs/advanced/making plugins.md @@ -27,7 +27,7 @@ The following sections will go into detail for what methods can be implemented f - `cfg`: The full Quartz [[configuration]] - `allSlugs`: a list of all the valid content slugs (see [[paths]] for more information on what a `ServerSlug` is) - `StaticResources` is defined in `quartz/resources.tsx`. It consists of - - `css`: a list of URLs for stylesheets that should be loaded + - `css`: a list of CSS style definitions that should be loaded. A CSS style is described with the `CSSResource` type which is also defined in `quartz/resources.tsx`. It accepts either a source URL or the inline content of the stylesheet. - `js`: a list of scripts that should be loaded. A script is described with the `JSResource` type which is also defined in `quartz/resources.tsx`. It allows you to define a load time (either before or after the DOM has been loaded), whether it should be a module, and either the source URL or the inline content of the script. ## Transformers @@ -85,8 +85,10 @@ export const Latex: QuartzTransformerPlugin = (opts?: Options) => { if (engine === "katex") { return { css: [ - // base css - "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css", + { + // base css + content: "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css", + }, ], js: [ { diff --git a/quartz/components/Head.tsx b/quartz/components/Head.tsx index 90e338730..cf79434fa 100644 --- a/quartz/components/Head.tsx +++ b/quartz/components/Head.tsx @@ -1,6 +1,6 @@ import { i18n } from "../i18n" import { FullSlug, joinSegments, pathToRoot } from "../util/path" -import { JSResourceToScriptElement } from "../util/resources" +import { CSSResourceToStyleElement, JSResourceToScriptElement } from "../util/resources" import { googleFontHref } from "../util/theme" import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" @@ -40,9 +40,7 @@ export default (() => { - {css.map((href) => ( - - ))} + {css.map((resource) => CSSResourceToStyleElement(resource, true))} {js .filter((resource) => resource.loadTime === "beforeDOMReady") .map((res) => JSResourceToScriptElement(res, true))} diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx index f2dcceaa5..9c530967b 100644 --- a/quartz/components/renderPage.tsx +++ b/quartz/components/renderPage.tsx @@ -29,7 +29,12 @@ export function pageResources( const contentIndexScript = `const fetchData = fetch("${contentIndexPath}").then(data => data.json())` return { - css: [joinSegments(baseDir, "index.css"), ...staticResources.css], + css: [ + { + content: joinSegments(baseDir, "index.css"), + }, + ...staticResources.css, + ], js: [ { src: joinSegments(baseDir, "prescript.js"), diff --git a/quartz/plugins/transformers/latex.ts b/quartz/plugins/transformers/latex.ts index 28b4d506a..d323b3ee6 100644 --- a/quartz/plugins/transformers/latex.ts +++ b/quartz/plugins/transformers/latex.ts @@ -31,8 +31,10 @@ export const Latex: QuartzTransformerPlugin> = (opts) => { if (engine === "katex") { return { css: [ - // base css - "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css", + { + // base css + content: "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css", + }, ], js: [ { diff --git a/quartz/util/resources.tsx b/quartz/util/resources.tsx index a572d891f..72ae9e63e 100644 --- a/quartz/util/resources.tsx +++ b/quartz/util/resources.tsx @@ -16,6 +16,12 @@ export type JSResource = { } ) +export type CSSResource = { + content: string + inline?: boolean + spaPreserve?: boolean +} + export function JSResourceToScriptElement(resource: JSResource, preserve?: boolean): JSX.Element { const scriptType = resource.moduleType ?? "application/javascript" const spaPreserve = preserve ?? resource.spaPreserve @@ -36,7 +42,24 @@ export function JSResourceToScriptElement(resource: JSResource, preserve?: boole } } +export function CSSResourceToStyleElement(resource: CSSResource, preserve?: boolean): JSX.Element { + const spaPreserve = preserve ?? resource.spaPreserve + if (resource.inline ?? false) { + return + } else { + return ( + + ) + } +} + export interface StaticResources { - css: string[] + css: CSSResource[] js: JSResource[] } From 97a22d75c90a4a183be21ae0e559e531db9c6104 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 1 Nov 2024 01:41:59 +0000 Subject: [PATCH 08/16] chore (update): fetch submodule --- content | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content b/content index 2338ee5d1..dab49133f 160000 --- a/content +++ b/content @@ -1 +1 @@ -Subproject commit 2338ee5d17200d5ab2e9a2a81e599caadc82270c +Subproject commit dab49133f2f0dc155a122adcc81113ae7aa9373a From 4c4444b9e2d28335bb868032a377fbe683d9e395 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 1 Nov 2024 01:44:07 +0000 Subject: [PATCH 09/16] chore (update): fetch submodule --- content | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content b/content index dab49133f..4f1583336 160000 --- a/content +++ b/content @@ -1 +1 @@ -Subproject commit dab49133f2f0dc155a122adcc81113ae7aa9373a +Subproject commit 4f1583336bc93a12f8d80fac918b1742a781813f From 9a7b060a6f8016412a1071c402e9e6bccb428d89 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 1 Nov 2024 01:48:11 +0000 Subject: [PATCH 10/16] chore (update): fetch submodule --- content | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content b/content index 4f1583336..7b50a462a 160000 --- a/content +++ b/content @@ -1 +1 @@ -Subproject commit 4f1583336bc93a12f8d80fac918b1742a781813f +Subproject commit 7b50a462aa4c61bec537e588d1d6724fed782e27 From eecfd38145254c74088f4a139a65da9409d07821 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 1 Nov 2024 01:52:55 +0000 Subject: [PATCH 11/16] chore (update): fetch submodule --- content | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content b/content index 7b50a462a..df450b57c 160000 --- a/content +++ b/content @@ -1 +1 @@ -Subproject commit 7b50a462aa4c61bec537e588d1d6724fed782e27 +Subproject commit df450b57c42788e7e73084e8267d708ac1976197 From ecd012274f5c1c56ffee78ab7df993275a832b90 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 1 Nov 2024 02:35:26 +0000 Subject: [PATCH 12/16] chore (update): fetch submodule --- content | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content b/content index df450b57c..675703248 160000 --- a/content +++ b/content @@ -1 +1 @@ -Subproject commit df450b57c42788e7e73084e8267d708ac1976197 +Subproject commit 6757032487b6e0a0672745e39f6155dacf76f73a From ff48b5962d270d22f0512981948d43757bf51ad0 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 1 Nov 2024 02:48:48 +0000 Subject: [PATCH 13/16] chore (update): fetch submodule --- content | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content b/content index 675703248..4db61e865 160000 --- a/content +++ b/content @@ -1 +1 @@ -Subproject commit 6757032487b6e0a0672745e39f6155dacf76f73a +Subproject commit 4db61e865838445b35d71dae7edd70782b892b6c From 56ba2f4fa75c0abe45c231533b5d2edd9791a0ec Mon Sep 17 00:00:00 2001 From: Aaron Pham Date: Fri, 1 Nov 2024 07:16:12 -0400 Subject: [PATCH 14/16] feat(build): add support for parsing inline sass (#1558) --- quartz/cli/handlers.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/quartz/cli/handlers.js b/quartz/cli/handlers.js index ed1c0e21c..55381523a 100644 --- a/quartz/cli/handlers.js +++ b/quartz/cli/handlers.js @@ -44,7 +44,7 @@ export async function handleCreate(argv) { let linkResolutionStrategy = argv.links?.toLowerCase() const sourceDirectory = argv.source - // If all cmd arguments were provided, check if theyre valid + // If all cmd arguments were provided, check if they're valid if (setupStrategy && linkResolutionStrategy) { // If setup isn't, "new", source argument is required if (setupStrategy !== "new") { @@ -236,6 +236,11 @@ export async function handleBuild(argv) { type: "css-text", cssImports: true, }), + sassPlugin({ + filter: /\.inline\.scss$/, + type: "css", + cssImports: true, + }), { name: "inline-script-loader", setup(build) { From 74f8c13598b00db30808b6d11fb691b38e313d93 Mon Sep 17 00:00:00 2001 From: Stephen Tse Date: Mon, 4 Nov 2024 17:22:36 -0800 Subject: [PATCH 15/16] fix: reset z-index instead of inherited unset (#1528) Co-authored-by: Aaron Pham --- quartz/components/scripts/graph.inline.ts | 2 +- quartz/components/scripts/search.inline.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quartz/components/scripts/graph.inline.ts b/quartz/components/scripts/graph.inline.ts index 5e8d48c13..dbddae91f 100644 --- a/quartz/components/scripts/graph.inline.ts +++ b/quartz/components/scripts/graph.inline.ts @@ -580,7 +580,7 @@ document.addEventListener("nav", async (e: CustomEventMap["nav"]) => { function hideGlobalGraph() { container?.classList.remove("active") if (sidebar) { - sidebar.style.zIndex = "unset" + sidebar.style.zIndex = "" } } diff --git a/quartz/components/scripts/search.inline.ts b/quartz/components/scripts/search.inline.ts index 73e64b361..f422d4988 100644 --- a/quartz/components/scripts/search.inline.ts +++ b/quartz/components/scripts/search.inline.ts @@ -178,7 +178,7 @@ document.addEventListener("nav", async (e: CustomEventMap["nav"]) => { searchBar.value = "" // clear the input when we dismiss the search } if (sidebar) { - sidebar.style.zIndex = "unset" + sidebar.style.zIndex = "" } if (results) { removeAllChildren(results) From 1d5b6f58d8e315df55392578a9110406aa074064 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 21:03:30 -0500 Subject: [PATCH 16/16] chore(deps): bump the production-dependencies group with 4 updates (#1565) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 112 +++++++++++++++++++++++----------------------- package.json | 8 ++-- 2 files changed, 60 insertions(+), 60 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7a543fd1c..a974eb405 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.11", + "@floating-ui/dom": "^1.6.12", "@napi-rs/simple-git": "0.1.19", "@tweenjs/tween.js": "^25.0.0", "async-mutex": "^0.5.0", @@ -28,7 +28,7 @@ "hast-util-to-string": "^3.0.1", "is-absolute-url": "^4.0.1", "js-yaml": "^4.1.0", - "lightningcss": "^1.27.0", + "lightningcss": "^1.28.1", "mdast-util-find-and-replace": "^3.0.1", "mdast-util-to-hast": "^13.2.0", "mdast-util-to-string": "^4.0.0", @@ -76,10 +76,10 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.8.1", + "@types/node": "^22.8.7", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", - "@types/ws": "^8.5.12", + "@types/ws": "^8.5.13", "@types/yargs": "^17.0.33", "esbuild": "^0.24.0", "prettier": "^3.3.3", @@ -587,9 +587,9 @@ } }, "node_modules/@floating-ui/dom": { - "version": "1.6.11", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.11.tgz", - "integrity": "sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ==", + "version": "1.6.12", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.12.tgz", + "integrity": "sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w==", "dependencies": { "@floating-ui/core": "^1.6.0", "@floating-ui/utils": "^0.2.8" @@ -1307,9 +1307,9 @@ } }, "node_modules/@types/node": { - "version": "22.8.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.1.tgz", - "integrity": "sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==", + "version": "22.8.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.7.tgz", + "integrity": "sha512-LidcG+2UeYIWcMuMUpBKOnryBWG/rnmOHQR5apjn8myTQcx3rinFRn7DcIFhMnS0PPFSC6OafdIKEad0lj6U0Q==", "dev": true, "dependencies": { "undici-types": "~6.19.8" @@ -1336,9 +1336,9 @@ "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==" }, "node_modules/@types/ws": { - "version": "8.5.12", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", - "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", + "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", "dev": true, "dependencies": { "@types/node": "*" @@ -3369,9 +3369,9 @@ } }, "node_modules/lightningcss": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.27.0.tgz", - "integrity": "sha512-8f7aNmS1+etYSLHht0fQApPc2kNO8qGRutifN5rVIc6Xo6ABsEbqOr758UwI7ALVbTt4x1fllKt0PYgzD9S3yQ==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.28.1.tgz", + "integrity": "sha512-KRDkHlLlNj3DWh79CDt93fPlRJh2W1AuHV0ZSZAMMuN7lqlsZTV5842idfS1urWG8q9tc17velp1gCXhY7sLnQ==", "dependencies": { "detect-libc": "^1.0.3" }, @@ -3383,22 +3383,22 @@ "url": "https://opencollective.com/parcel" }, "optionalDependencies": { - "lightningcss-darwin-arm64": "1.27.0", - "lightningcss-darwin-x64": "1.27.0", - "lightningcss-freebsd-x64": "1.27.0", - "lightningcss-linux-arm-gnueabihf": "1.27.0", - "lightningcss-linux-arm64-gnu": "1.27.0", - "lightningcss-linux-arm64-musl": "1.27.0", - "lightningcss-linux-x64-gnu": "1.27.0", - "lightningcss-linux-x64-musl": "1.27.0", - "lightningcss-win32-arm64-msvc": "1.27.0", - "lightningcss-win32-x64-msvc": "1.27.0" + "lightningcss-darwin-arm64": "1.28.1", + "lightningcss-darwin-x64": "1.28.1", + "lightningcss-freebsd-x64": "1.28.1", + "lightningcss-linux-arm-gnueabihf": "1.28.1", + "lightningcss-linux-arm64-gnu": "1.28.1", + "lightningcss-linux-arm64-musl": "1.28.1", + "lightningcss-linux-x64-gnu": "1.28.1", + "lightningcss-linux-x64-musl": "1.28.1", + "lightningcss-win32-arm64-msvc": "1.28.1", + "lightningcss-win32-x64-msvc": "1.28.1" } }, "node_modules/lightningcss-darwin-arm64": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.27.0.tgz", - "integrity": "sha512-Gl/lqIXY+d+ySmMbgDf0pgaWSqrWYxVHoc88q+Vhf2YNzZ8DwoRzGt5NZDVqqIW5ScpSnmmjcgXP87Dn2ylSSQ==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.28.1.tgz", + "integrity": "sha512-VG3vvzM0m/rguCdm76DdobNeNJnHK+jWcdkNLFWHLh9YCotRvbRIt45JxwcHlIF8TDqWStVLTdghq5NaigVCBQ==", "cpu": [ "arm64" ], @@ -3415,9 +3415,9 @@ } }, "node_modules/lightningcss-darwin-x64": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.27.0.tgz", - "integrity": "sha512-0+mZa54IlcNAoQS9E0+niovhyjjQWEMrwW0p2sSdLRhLDc8LMQ/b67z7+B5q4VmjYCMSfnFi3djAAQFIDuj/Tg==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.28.1.tgz", + "integrity": "sha512-O7ORdislvKfMohFl4Iq7fxKqdJOuuxArcglVI3amuFO5DJ0wfV3Gxgi1JRo49slfr7OVzJQEHLG4muTWYM5cTQ==", "cpu": [ "x64" ], @@ -3434,9 +3434,9 @@ } }, "node_modules/lightningcss-freebsd-x64": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.27.0.tgz", - "integrity": "sha512-n1sEf85fePoU2aDN2PzYjoI8gbBqnmLGEhKq7q0DKLj0UTVmOTwDC7PtLcy/zFxzASTSBlVQYJUhwIStQMIpRA==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.28.1.tgz", + "integrity": "sha512-b7sF89B31kYYijxVcFO7l5u6UNA862YstNu+3YbLl/IQKzveL4a5cwR5cdpG+OOhErg/c2u9WCmzZoX2I5GBvw==", "cpu": [ "x64" ], @@ -3453,9 +3453,9 @@ } }, "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.27.0.tgz", - "integrity": "sha512-MUMRmtdRkOkd5z3h986HOuNBD1c2lq2BSQA1Jg88d9I7bmPGx08bwGcnB75dvr17CwxjxD6XPi3Qh8ArmKFqCA==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.28.1.tgz", + "integrity": "sha512-p61kXwvhUDLLzkWHjzSFfUBW/F0iy3jr3CWi3k8SKULtJEsJXTI9DqRm9EixxMSe2AMBQBt4auTYiQL4B1N51A==", "cpu": [ "arm" ], @@ -3472,9 +3472,9 @@ } }, "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.27.0.tgz", - "integrity": "sha512-cPsxo1QEWq2sfKkSq2Bq5feQDHdUEwgtA9KaB27J5AX22+l4l0ptgjMZZtYtUnteBofjee+0oW1wQ1guv04a7A==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.28.1.tgz", + "integrity": "sha512-iO+fN9hOMmzfwqcG2/BgUtMKD48H2JO/SXU44fyIwpY2veb65QF5xiRrQ9l1FwIxbGK3231KBYCtAqv+xf+NsQ==", "cpu": [ "arm64" ], @@ -3491,9 +3491,9 @@ } }, "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.27.0.tgz", - "integrity": "sha512-rCGBm2ax7kQ9pBSeITfCW9XSVF69VX+fm5DIpvDZQl4NnQoMQyRwhZQm9pd59m8leZ1IesRqWk2v/DntMo26lg==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.28.1.tgz", + "integrity": "sha512-dnMHeXEmCUzHHZjaDpQBYuBKcN9nPC3nPFKl70bcj5Bkn5EmkcgEqm5p035LKOgvAwk1XwLpQCML6pXmCwz0NQ==", "cpu": [ "arm64" ], @@ -3510,9 +3510,9 @@ } }, "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.27.0.tgz", - "integrity": "sha512-Dk/jovSI7qqhJDiUibvaikNKI2x6kWPN79AQiD/E/KeQWMjdGe9kw51RAgoWFDi0coP4jinaH14Nrt/J8z3U4A==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.28.1.tgz", + "integrity": "sha512-7vWDISaMUn+oo2TwRdf2hl/BLdPxvywv9JKEqNZB/0K7bXwV4XE9wN/C2sAp1gGuh6QBA8lpjF4JIPt3HNlCHA==", "cpu": [ "x64" ], @@ -3529,9 +3529,9 @@ } }, "node_modules/lightningcss-linux-x64-musl": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.27.0.tgz", - "integrity": "sha512-QKjTxXm8A9s6v9Tg3Fk0gscCQA1t/HMoF7Woy1u68wCk5kS4fR+q3vXa1p3++REW784cRAtkYKrPy6JKibrEZA==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.28.1.tgz", + "integrity": "sha512-IHCu9tVGP+x5BCpA2rF3D04DBokcBza/a8AuHQU+1AiMKubuMegPwcL7RatBgK4ztFHeYnnD5NdhwhRfYMAtNA==", "cpu": [ "x64" ], @@ -3548,9 +3548,9 @@ } }, "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.27.0.tgz", - "integrity": "sha512-/wXegPS1hnhkeG4OXQKEMQeJd48RDC3qdh+OA8pCuOPCyvnm/yEayrJdJVqzBsqpy1aJklRCVxscpFur80o6iQ==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.28.1.tgz", + "integrity": "sha512-Erm72kHmMg/3h350PTseskz+eEGBM17Fuu79WW2Qqt0BfWSF1jHHc12lkJCWMYl5jcBHPs5yZdgNHtJ7IJS3Uw==", "cpu": [ "arm64" ], @@ -3567,9 +3567,9 @@ } }, "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.27.0.tgz", - "integrity": "sha512-/OJLj94Zm/waZShL8nB5jsNj3CfNATLCTyFxZyouilfTmSoLDX7VlVAmhPHoZWVFp4vdmoiEbPEYC8HID3m6yw==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.28.1.tgz", + "integrity": "sha512-ZPQtvx+uQBzrSdHH8p4H3M9Alue+x369TPZAA3b4K3d92FPhpZCuBG04+HQzspam9sVeID9mI6f3VRAs2ezaEA==", "cpu": [ "x64" ], diff --git a/package.json b/package.json index 97cde0464..fdd9f8737 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "@clack/prompts": "^0.7.0", - "@floating-ui/dom": "^1.6.11", + "@floating-ui/dom": "^1.6.12", "@napi-rs/simple-git": "0.1.19", "@tweenjs/tween.js": "^25.0.0", "async-mutex": "^0.5.0", @@ -54,7 +54,7 @@ "hast-util-to-string": "^3.0.1", "is-absolute-url": "^4.0.1", "js-yaml": "^4.1.0", - "lightningcss": "^1.27.0", + "lightningcss": "^1.28.1", "mdast-util-find-and-replace": "^3.0.1", "mdast-util-to-hast": "^13.2.0", "mdast-util-to-string": "^4.0.0", @@ -99,10 +99,10 @@ "@types/d3": "^7.4.3", "@types/hast": "^3.0.4", "@types/js-yaml": "^4.0.9", - "@types/node": "^22.8.1", + "@types/node": "^22.8.7", "@types/pretty-time": "^1.1.5", "@types/source-map-support": "^0.5.10", - "@types/ws": "^8.5.12", + "@types/ws": "^8.5.13", "@types/yargs": "^17.0.33", "esbuild": "^0.24.0", "prettier": "^3.3.3",