@quartz-community/unlisted-pages 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9be2119: `unlisted:` also applies to pages rendered from files that have frontmatter, such as Excalidraw drawings stored as Markdown (`.excalidraw.md`), through Quartz 5.1's `virtualPageHtmlPlugins` (quartz-community/bases-page#11).
|
|
8
|
+
|
|
3
9
|
## 1.0.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -9,12 +9,18 @@ var rehypeUnlisted = () => {
|
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
var UnlistedPages = () => {
|
|
12
|
-
|
|
12
|
+
const instance = {
|
|
13
13
|
name: "UnlistedPages",
|
|
14
14
|
htmlPlugins() {
|
|
15
15
|
return [rehypeUnlisted()];
|
|
16
|
+
},
|
|
17
|
+
// Pages rendered from files (Quartz 5.1+): a drawing stored as Markdown has frontmatter, and
|
|
18
|
+
// `unlisted:` there unlists it like a note (quartz-community/bases-page#11).
|
|
19
|
+
virtualPageHtmlPlugins() {
|
|
20
|
+
return [rehypeUnlisted()];
|
|
16
21
|
}
|
|
17
22
|
};
|
|
23
|
+
return instance;
|
|
18
24
|
};
|
|
19
25
|
|
|
20
26
|
export { UnlistedPages };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/transformer.ts"],"names":[],"mappings":";AAKA,IAAM,iBAAiB,MAA4B;AACjD,EAAA,OAAO,MAAM,CAAC,KAAA,EAAiB,IAAA,KAAgB;AAC7C,IAAA,MAAM,WAAA,GAAc,KAAK,IAAA,EAAM,WAAA;AAC/B,IAAA,MAAM,WAAW,WAAA,EAAa,QAAA;AAC9B,IAAA,IAAI,OAAO,aAAa,SAAA,EAAW;AACjC,MAAC,IAAA,CAAK,KAAiC,QAAA,GAAW,QAAA;AAAA,IACpD;AAAA,EACF,CAAA;AACF,CAAA;AAEO,IAAM,gBAAoD,MAAM;
|
|
1
|
+
{"version":3,"sources":["../src/transformer.ts"],"names":[],"mappings":";AAKA,IAAM,iBAAiB,MAA4B;AACjD,EAAA,OAAO,MAAM,CAAC,KAAA,EAAiB,IAAA,KAAgB;AAC7C,IAAA,MAAM,WAAA,GAAc,KAAK,IAAA,EAAM,WAAA;AAC/B,IAAA,MAAM,WAAW,WAAA,EAAa,QAAA;AAC9B,IAAA,IAAI,OAAO,aAAa,SAAA,EAAW;AACjC,MAAC,IAAA,CAAK,KAAiC,QAAA,GAAW,QAAA;AAAA,IACpD;AAAA,EACF,CAAA;AACF,CAAA;AAEO,IAAM,gBAAoD,MAAM;AAErE,EAAA,MAAM,QAAA,GAEF;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,WAAA,GAA6B;AAC3B,MAAA,OAAO,CAAC,gBAAgB,CAAA;AAAA,IAC1B,CAAA;AAAA;AAAA;AAAA,IAGA,sBAAA,GAAwC;AACtC,MAAA,OAAO,CAAC,gBAAgB,CAAA;AAAA,IAC1B;AAAA,GACF;AACA,EAAA,OAAO,QAAA;AACT","file":"index.js","sourcesContent":["import type { PluggableList, Plugin } from \"unified\";\nimport type { Root as HastRoot } from \"hast\";\nimport type { VFile } from \"vfile\";\nimport type { QuartzTransformerPlugin } from \"@quartz-community/types\";\n\nconst rehypeUnlisted = (): Plugin<[], HastRoot> => {\n return () => (_tree: HastRoot, file: VFile) => {\n const frontmatter = file.data?.frontmatter as Record<string, unknown> | undefined;\n const unlisted = frontmatter?.unlisted;\n if (typeof unlisted === \"boolean\") {\n (file.data as Record<string, unknown>).unlisted = unlisted;\n }\n };\n};\n\nexport const UnlistedPages: QuartzTransformerPlugin<undefined> = () => {\n // a variable, not a literal: `virtualPageHtmlPlugins` is newer than the declared types\n const instance: ReturnType<QuartzTransformerPlugin> & {\n virtualPageHtmlPlugins(): PluggableList;\n } = {\n name: \"UnlistedPages\",\n htmlPlugins(): PluggableList {\n return [rehypeUnlisted()];\n },\n // Pages rendered from files (Quartz 5.1+): a drawing stored as Markdown has frontmatter, and\n // `unlisted:` there unlists it like a note (quartz-community/bases-page#11).\n virtualPageHtmlPlugins(): PluggableList {\n return [rehypeUnlisted()];\n },\n };\n return instance;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quartz-community/unlisted-pages",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Bridges `frontmatter.unlisted` to `file.data.unlisted` so any page can opt out of discovery surfaces (contentIndex, RSS, sitemap, graph, explorer, search, backlinks, recent-notes, folder-page, tag-page) while remaining accessible by direct URL.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@quartz-community/types": "^1.0.0"
|
|
65
|
-
"@quartz-community/utils": "^1.0.0"
|
|
64
|
+
"@quartz-community/types": "^1.0.0"
|
|
66
65
|
},
|
|
67
66
|
"devDependencies": {
|
|
67
|
+
"@changesets/cli": "^2.29.2",
|
|
68
68
|
"@types/hast": "^3.0.4",
|
|
69
69
|
"@types/node": "^24.10.0",
|
|
70
70
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
@@ -76,8 +76,7 @@
|
|
|
76
76
|
"typescript": "^5.9.3",
|
|
77
77
|
"unified": "^11.0.5",
|
|
78
78
|
"vfile": "^6.0.3",
|
|
79
|
-
"vitest": "^2.1.9"
|
|
80
|
-
"@changesets/cli": "^2.29.2"
|
|
79
|
+
"vitest": "^2.1.9"
|
|
81
80
|
},
|
|
82
81
|
"quartz": {
|
|
83
82
|
"name": "unlisted-pages",
|