@chengzhao-dev/dsh-quarto-book 0.3.4 → 0.3.5
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/LICENSE +20 -20
- package/README.en.md +3 -3
- package/README.md +3 -3
- package/docs/plugin-flow.md +2 -2
- package/docs/versioning.md +8 -8
- package/package.json +1 -1
- package/skills/designing-theme/assets/theme/css/base.css +368 -368
- package/skills/designing-theme/assets/theme/includes/footer.html +63 -63
- package/skills/designing-theme/assets/theme/palettes/github/meta.md +38 -38
- package/skills/designing-theme/knowledge/reading-surface.md +68 -68
- package/skills/designing-theme/scripts/measuring-pages.mjs +309 -309
- package/skills/writing-quarto/SKILL.md +43 -43
- package/skills/writing-quarto/scripts/checking-callouts.py +102 -102
- package/skills/writing-quarto/scripts/checking-dom.py +577 -577
- package/skills/writing-quarto/scripts/diagrams/rendering-coords.py +250 -250
- package/skills/writing-quarto/scripts/testing-check-ascii-names.py +71 -71
- package/skills/writing-quarto/scripts/testing-content.py +149 -149
- package/skills/writing-quarto/scripts/verifying-content.py +378 -378
- package/templates/quarto-book-project/writing/chapter-map.md +22 -22
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 chengzhao-dev
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 chengzhao-dev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
package/README.en.md
CHANGED
|
@@ -21,12 +21,12 @@ Both skills are discovered from the package's `skills/` directory and loaded on
|
|
|
21
21
|
## Install
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
dsh plugin --profile web add npm:@chengzhao-dev/dsh-quarto-book@0.3.
|
|
24
|
+
dsh plugin --profile web add npm:@chengzhao-dev/dsh-quarto-book@0.3.5
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Replace `--profile` with the profile you actually run. The desktop app always runs the `desktop` profile, and that profile is owned by the app, so `dsh --profile desktop` is rejected; install or upgrade a plugin with `dsh plugin --profile desktop add <package>`, and use the app's Settings → Plugins → Add plugin with `npm:@chengzhao-dev/dsh-quarto-book@0.3.
|
|
27
|
+
Replace `--profile` with the profile you actually run. The desktop app always runs the `desktop` profile, and that profile is owned by the app, so `dsh --profile desktop` is rejected; install or upgrade a plugin with `dsh plugin --profile desktop add <package>`, and use the app's Settings → Plugins → Add plugin with `npm:@chengzhao-dev/dsh-quarto-book@0.3.5` only if the app refuses that write. To follow a GitHub tag instead, use `github:chengzhao-dev/dsh-quarto-book#v0.3.5`.
|
|
28
28
|
|
|
29
|
-
Upgrading from the old unscoped package `dsh-quarto-book
|
|
29
|
+
Upgrading from the old unscoped package `dsh-quarto-book` (removed from npm with 0.3.4, so this only affects profiles that installed it earlier): remove it from the same profile first with `dsh plugin --profile <profile> remove dsh-quarto-book`, then add the scoped package. Keeping both installed registers `writing-quarto` and `designing-theme` twice at the same rank 550.
|
|
30
30
|
|
|
31
31
|
Requires DSH 0.2.x and Node.js 22 or newer. The source is TypeScript; the published package already contains compiled `lib/`, so installation needs no build step.
|
|
32
32
|
|
package/README.md
CHANGED
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
## 安装
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
dsh plugin --profile web add npm:@chengzhao-dev/dsh-quarto-book@0.3.
|
|
24
|
+
dsh plugin --profile web add npm:@chengzhao-dev/dsh-quarto-book@0.3.5
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
`--profile` 换成你实际运行的那个 profile。桌面应用固定跑 `desktop` profile,且该 profile 由应用独占管理,`dsh --profile desktop` 直接启动会被拒绝;安装或升级插件可用 `dsh plugin --profile desktop add <包>`,如果应用拒绝写入,再走「设置 → 插件 → 添加插件」,地址填 `npm:@chengzhao-dev/dsh-quarto-book@0.3.
|
|
27
|
+
`--profile` 换成你实际运行的那个 profile。桌面应用固定跑 `desktop` profile,且该 profile 由应用独占管理,`dsh --profile desktop` 直接启动会被拒绝;安装或升级插件可用 `dsh plugin --profile desktop add <包>`,如果应用拒绝写入,再走「设置 → 插件 → 添加插件」,地址填 `npm:@chengzhao-dev/dsh-quarto-book@0.3.5`。想跟 GitHub 标签,也可以写 `github:chengzhao-dev/dsh-quarto-book#v0.3.5`。
|
|
28
28
|
|
|
29
|
-
从旧的无作用域包 `dsh-quarto-book`
|
|
29
|
+
从旧的无作用域包 `dsh-quarto-book` 升级时(该包已随 0.3.4 从 npm 删除,只影响之前装过它的 profile),先在同一个 profile 里 `dsh plugin --profile <profile> remove dsh-quarto-book` 再装新包。两个包同时留着会以相同的 rank 550 各注册一遍 `writing-quarto` 和 `designing-theme`。
|
|
30
30
|
|
|
31
31
|
要求 DSH 0.2.x、Node.js 22 及以上。源码是 TypeScript,发布包已带编译后的 `lib/`;安装后不需要构建。
|
|
32
32
|
|
package/docs/plugin-flow.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
| 层 | 读者看到什么 | 生效条件 | 排障入口 |
|
|
8
8
|
| --- | --- | --- | --- |
|
|
9
|
-
| 1 安装 | 插件出现在 profile 的依赖里 | `dsh plugin --profile <profile> add npm:@chengzhao-dev/dsh-quarto-book@0.3.
|
|
9
|
+
| 1 安装 | 插件出现在 profile 的依赖里 | `dsh plugin --profile <profile> add npm:@chengzhao-dev/dsh-quarto-book@0.3.5` 成功,profile 的 `package.json` 有这条依赖 | `docs/versioning.md` |
|
|
10
10
|
| 2 技能名出现 | 选题里能看到 `writing-quarto`、`designing-theme` | 会话 `cwd` 向上找到 git 根,沿途 `_quarto.yml` 有一行独立的 `type: book`,且这本书至少有一个章节源文件 | `docs/plugin-boundaries.md` |
|
|
11
11
|
| 3 开始写章节 | 九个写作步骤和三套案例文件 | 第 2 层通过;章节文件是 `.qmd` 或 `.md` | `skills/writing-quarto/SKILL.md` |
|
|
12
12
|
| 4 渲染检查 | `quarto_render_check` 返回 `safe_to_render` 与 `html_report` | 与第 2 层同一道门禁 | `skills/writing-quarto/steps/09-check.md` |
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
装好后 profile 的 `package.json` 里出现 `@chengzhao-dev/dsh-quarto-book`。两处名字必须逐字一致:`package.json` 的 `name` 与 `cordis.patch.yml` 里 `- name:` 指向同一个包名;不一致时补丁插不进去,工具和技能都不会注册。
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
profile 里还留着旧的无作用域包 `dsh-quarto-book` 时(该包已随 0.3.4 从 npm 删除),先在同一个 profile 里删旧包再装新包。两个包同时留着时,会以相同的 rank 550 各注册一遍 `writing-quarto` 和 `designing-theme`。版本号与发布步骤见 `docs/versioning.md`。
|
|
31
31
|
|
|
32
32
|
## 2 技能名出现
|
|
33
33
|
|
package/docs/versioning.md
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
- 磁盘:profile 的 `package.json` 里 `dependencies`,以及 `node_modules/@chengzhao-dev/dsh-quarto-book/package.json` 的 `version`。
|
|
11
11
|
- 运行时加载清单:`dsh --profile <profile> --dump-config`,确认 `# == @chengzhao-dev/dsh-quarto-book` 这一层在。官方「设置 → 插件」只显示模块名和启用状态,不显示版本。
|
|
12
12
|
|
|
13
|
-
README 里的安装命令钉住一次发布:npm 写 `@0.3.
|
|
13
|
+
README 里的安装命令钉住一次发布:npm 写 `@0.3.5`,git 写 `#v0.3.5`。不带版本号的 `github:` 地址跟踪默认分支的某次提交,`package.json` 的版本号不会自动变成发布号。
|
|
14
14
|
|
|
15
|
-
包名与模块名不是一回事:npm 与 profile 依赖里是 `@chengzhao-dev/dsh-quarto-book`,`cordis.patch.yml` 的 `name` 必须与它逐字相同;插件模块导出的 `name` 与技能 provider 的常量仍是短名 `dsh-quarto-book`,技能名与工具名不变。旧的无作用域包 `dsh-quarto-book` 是另一个 npm
|
|
15
|
+
包名与模块名不是一回事:npm 与 profile 依赖里是 `@chengzhao-dev/dsh-quarto-book`,`cordis.patch.yml` 的 `name` 必须与它逐字相同;插件模块导出的 `name` 与技能 provider 的常量仍是短名 `dsh-quarto-book`,技能名与工具名不变。旧的无作用域包 `dsh-quarto-book` 是另一个 npm 坐标,已随 0.3.4 从 npm 删除;之前装过它的 profile 仍要先 `remove` 再装新包,两份同时留着会以相同的 rank 550 各注册一遍 `writing-quarto` 和 `designing-theme`。
|
|
16
16
|
|
|
17
17
|
## 三档
|
|
18
18
|
|
|
@@ -36,20 +36,20 @@ flowchart TD
|
|
|
36
36
|
|
|
37
37
|
## 发布
|
|
38
38
|
|
|
39
|
-
发布时三处一起动:`package.json` 的 `version`、`package-lock.json` 顶部的版本、同号的 annotated git tag(`0.3.
|
|
39
|
+
发布时三处一起动:`package.json` 的 `version`、`package-lock.json` 顶部的版本、同号的 annotated git tag(`0.3.5` 对应 `v0.3.5`)。不在 `SKILL.md` 里再维护一套包版本。
|
|
40
40
|
|
|
41
|
-
发布走 npm trusted publisher
|
|
41
|
+
发布走 npm trusted publisher。`0.3.4` 是这个作用域包的首个版本,由本机手工 `npm publish` 引导,同时登记了关联(仓库 `chengzhao-dev/dsh-quarto-book`、文件 `publish.yml`、动作 `npm publish`);旧包 `dsh-quarto-book` 也在这次发布后从 npm 删除。之后的版本不再本机发布,顺序固定:
|
|
42
42
|
|
|
43
43
|
1. 提交并推送默认分支,先不打标签。
|
|
44
44
|
2. 只读核对:`npm view @chengzhao-dev/dsh-quarto-book version` 应仍是上一个发布号;`npm whoami` 未登录就停;`npm trust list @chengzhao-dev/dsh-quarto-book --json` 要能匹配 GitHub Actions、仓库 `chengzhao-dev/dsh-quarto-book`、文件 `publish.yml`、动作 `npm publish`。
|
|
45
|
-
3.
|
|
46
|
-
4. 关联匹配后打 annotated `
|
|
47
|
-
5. 以 Actions 全绿且 `npm view @chengzhao-dev/dsh-quarto-book
|
|
45
|
+
3. 作用域包的关联已在 `0.3.4` 首发时登记,`npm trust list` 查不到或对不上就停住,把 `npm trust github @chengzhao-dev/dsh-quarto-book --repository chengzhao-dev/dsh-quarto-book --file publish.yml --allow-publish` 交给用户执行。用户回复「publisher 已配置」后重查,不跳过。
|
|
46
|
+
4. 关联匹配后打 annotated `v<版本>` 并推送;`publish.yml` 在 `v*` 标签上运行。
|
|
47
|
+
5. 以 Actions 全绿且 `npm view @chengzhao-dev/dsh-quarto-book@<版本> version` 返回该版本为发布完成。`0.3.4` 是首发引导版本,由本机手工发布,当次 Actions 因关联尚未登记而失败,不作完成判据。npm 上的版本不可撤回,失败就停在那里,不改回版本号。
|
|
48
48
|
|
|
49
49
|
关联登记后两天内必须推标签;过期就重新登记,不沿用旧凭据。
|
|
50
50
|
|
|
51
51
|
`.github/workflows/publish.yml` 只在 `v*` 标签上运行,权限是 `contents: read` 与 `id-token: write`,不设 GitHub Environment。步骤是 checkout、`actions/setup-node@v6`(Node 24、`registry-url: https://registry.npmjs.org`)、`npm ci`、`npm test`、`npm run build`、`npm publish --provenance`。`package.json` 的 `repository.url` 保持 `git+https://github.com/chengzhao-dev/dsh-quarto-book.git`,`publishConfig` 为 `access: public` 与 `provenance: true`。
|
|
52
52
|
|
|
53
|
-
发布后两种安装各钉各的:git 用 `#
|
|
53
|
+
发布后两种安装各钉各的:git 用 `#v<版本>`,npm 用 `@<版本>`。
|
|
54
54
|
|
|
55
55
|
写书时不读这份文档:它是本仓库的维护规则,不进任何一步。
|
package/package.json
CHANGED