@quartz-community/unlisted-pages 1.0.0 → 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 +12 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
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
|
+
|
|
9
|
+
## 1.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 39454c3: Releases are published from GitHub Actions with npm trusted publishing, so each version on npm now carries provenance linking it to the commit and workflow that built it. No changes to the package itself.
|
|
14
|
+
|
|
3
15
|
## 1.0.0
|
|
4
16
|
|
|
5
17
|
### Major 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.
|
|
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",
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"typecheck": "tsc --noEmit",
|
|
50
50
|
"check": "npm run typecheck && npm run lint && npm run format && npm run test",
|
|
51
51
|
"prepublishOnly": "npm run build",
|
|
52
|
-
"release": "npm run build && changeset publish"
|
|
52
|
+
"release": "npm run build && changeset publish",
|
|
53
|
+
"version-packages": "changeset version && npm install --package-lock-only --ignore-scripts --no-audit --no-fund"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
56
|
"vfile": "^6.0.3"
|
|
@@ -60,10 +61,10 @@
|
|
|
60
61
|
}
|
|
61
62
|
},
|
|
62
63
|
"dependencies": {
|
|
63
|
-
"@quartz-community/types": "^1.0.0"
|
|
64
|
-
"@quartz-community/utils": "^1.0.0"
|
|
64
|
+
"@quartz-community/types": "^1.0.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
+
"@changesets/cli": "^2.29.2",
|
|
67
68
|
"@types/hast": "^3.0.4",
|
|
68
69
|
"@types/node": "^24.10.0",
|
|
69
70
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
@@ -75,8 +76,7 @@
|
|
|
75
76
|
"typescript": "^5.9.3",
|
|
76
77
|
"unified": "^11.0.5",
|
|
77
78
|
"vfile": "^6.0.3",
|
|
78
|
-
"vitest": "^2.1.9"
|
|
79
|
-
"@changesets/cli": "^2.29.2"
|
|
79
|
+
"vitest": "^2.1.9"
|
|
80
80
|
},
|
|
81
81
|
"quartz": {
|
|
82
82
|
"name": "unlisted-pages",
|