dsh-tiddlywiki 0.26.1 → 0.26.3
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/README.md +2 -0
- package/lib/index.js +7 -6
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/host/admin.ts +11 -2
- package/src/host/seed-starter-docs.ts +5 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tiddlywiki",
|
|
3
3
|
"description": "TiddlyWiki 5 as the DSH persistent knowledge base: fifteen tiddlywiki_* agent tools (filtered search/recent/tags/batch/rewrite/trash/lint + git sync & conflict resolve), a full TiddlyWiki editor embedded in the GUI center column (same-origin proxy, works over Tailscale/LAN/domain), a right-side wiki tab, a per-session summary tab, a quick-note card with draft auto-save behind a single knowledge FAB, an optional clip bookmarklet that also saves selected images as attachments, and git-based sync with auto-commit. Mounts via the official dsh plugin system — no DSH source changes.",
|
|
4
|
-
"version": "0.26.
|
|
4
|
+
"version": "0.26.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"dsh",
|
package/src/host/admin.ts
CHANGED
|
@@ -359,16 +359,25 @@ export async function bundledCatalog(twRoot: string): Promise<Catalog> {
|
|
|
359
359
|
}
|
|
360
360
|
const out: CatalogEntry[] = []
|
|
361
361
|
for (const dir of dirs) {
|
|
362
|
-
let info: { name?: string; description?: string; dependents?: string[] } = {}
|
|
362
|
+
let info: { title?: string; name?: string; description?: string; dependents?: string[] } = {}
|
|
363
363
|
try {
|
|
364
364
|
info = JSON.parse(await readFile(join(root, dir, 'plugin.info'), 'utf8')) as typeof info
|
|
365
365
|
} catch {
|
|
366
366
|
info = {}
|
|
367
367
|
}
|
|
368
368
|
if (sub === 'themes' && dir !== 'vanilla' && !(await themeHasCss(dir))) continue
|
|
369
|
+
// The tiddler title comes from plugin.info, NOT from the folder name
|
|
370
|
+
// (v0.26.2): they normally agree, but `plugins/tiddlywiki/codemirror-fullscreen-editing`
|
|
371
|
+
// declares `"title": "$:/plugins/tiddlywiki/codemirror-fullscreen"` — deriving
|
|
372
|
+
// the title from the directory made every title-keyed comparison miss that
|
|
373
|
+
// plugin (the settings page's 「TW 内已禁用」/「wiki 内已装」 badges match on
|
|
374
|
+
// the full tiddler title, so a disabled codemirror-fullscreen showed no badge).
|
|
375
|
+
// plugin.info IS the tiddler TW loads, so it is the source of truth; the
|
|
376
|
+
// folder-derived form stays only as a fallback for a missing/empty title.
|
|
377
|
+
const declaredTitle = typeof info.title === 'string' && info.title.length > 0 ? info.title : undefined
|
|
369
378
|
out.push({
|
|
370
379
|
name: `tiddlywiki/${dir}`,
|
|
371
|
-
title: sub === 'plugins' ? `$:/plugins/tiddlywiki/${dir}` : `$:/themes/tiddlywiki/${dir}
|
|
380
|
+
title: declaredTitle ?? (sub === 'plugins' ? `$:/plugins/tiddlywiki/${dir}` : `$:/themes/tiddlywiki/${dir}`),
|
|
372
381
|
label: info.name ?? dir,
|
|
373
382
|
description: info.description ?? '',
|
|
374
383
|
// plugin.info `dependents` are full plugin titles → convert to names.
|
|
@@ -65,12 +65,12 @@ export const STARTER_DOCS_ITEMS: StarterDocItem[] = [
|
|
|
65
65
|
|
|
66
66
|
「汇总页」不是 TW 的特殊功能,而是:**一个普通笔记 + 正文里一段筛选器(filter)**。渲染时 TW 实时从整个 wiki 挑出符合条件的笔记列出来。**新笔记只要打上对应标签,汇总页自动出现,零维护**——不用像手工目录那样每次手动更新。
|
|
67
67
|
|
|
68
|
-
##
|
|
68
|
+
## 方法一:零代码,点标签自带的下拉列表
|
|
69
69
|
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
70
|
+
- 打开任意笔记,点正文底部的**标签丸**,或侧边栏「标签」(标签云)里点某个标签;
|
|
71
|
+
- 内核会弹出一个**下拉列表**,列出所有带此标签的笔记(还能拖拽排序、直接跳转)。
|
|
72
|
+
- 优点:一行代码都不用写;缺点:列表**全量不分页**(标签下笔记很多时会很长)、不能加说明文字、不能自定义排序/样式,也做不了「多主题合一」。
|
|
73
|
+
- ⚠️ 注意:它只是个弹层,**不是**一个可以打开、可以分享链接的「标签页面」——直接打开以标签命名的条目,看到的只是那个条目本身(不存在则是缺失提示),**不会**自动列出成员笔记。想要「一个页面 + 可翻页」的标签列表,用方法二自己写汇总页(笔记数量多时给它套上分页)。
|
|
74
74
|
|
|
75
75
|
## 方法二:一页一主题(最常用)
|
|
76
76
|
|