From c1414f940c1fca93df0c266a3e90c9ff1d7e88c7 Mon Sep 17 00:00:00 2001 From: shu Date: Sun, 26 Jul 2026 18:33:43 +0800 Subject: Initial TiddlyWiki setup --- tiddlers/tiddlywiki.tid | 112 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 tiddlers/tiddlywiki.tid (limited to 'tiddlers/tiddlywiki.tid') diff --git a/tiddlers/tiddlywiki.tid b/tiddlers/tiddlywiki.tid new file mode 100644 index 0000000..9c209ee --- /dev/null +++ b/tiddlers/tiddlywiki.tid @@ -0,0 +1,112 @@ +created: 20260726051257984 +modified: 20260726102329635 +tags: 资料 🍀 +title: tiddlywiki +type: text/vnd.tiddlywiki + +! 新增一个语法高亮 + +增加一个 [[tiddlers/highlight-tiddlywiki.tid|$:/plugins/local/highlight-languages/tiddlywiki.js]] 文件,重启服务就可以了 + +
+点击展开文件内容 + +{{$:/plugins/local/highlight-languages/tiddlywiki.js}} + +
+ +! 在侧边增加一个新的 tab + +```tid +title: $:/plugins/local/sidebar/starred +type: text/vnd.tiddlywiki +tags: $:/tags/SideBar +caption: 🍀 +list-after: $:/core/ui/SideBar/More + +
+ +<$list + filter="[tag[🍀]!has[draft.of]sort[title]]" + emptyMessage="还没有设置 🍀 标签的条目。" +> +
+<$link/> +
+ + +
+``` + +! 插件 - github-fork-ribbon + +在页面角落显示一个类似 GitHub “Fork me” 的斜角丝带,并链接到指定网址 + +编辑 [[$:/github-ribbon]] 并添加标签 {{$:/tags/PageTemplate||$:/core/ui/TagTemplate}} + +填写内容 + +```tid +<$transclude + $tiddler="$:/plugins/tiddlywiki/github-fork-ribbon/template" + position="right" + url="https://github.com/你的账号/你的仓库" + text="在 GitHub 查看" + color="#24292f" + top="30px" + fixed="fixed" +/> +``` + +! 插件 - 代码复制 + +在代码块右上角展示一个复制按钮,插件内容保存在 [[tiddlers/copy-codeblock.tid|$:/plugins/local/copy-codeblock/copy-codeblock.js]] + +
+点击展开文件内容 + +{{$:/plugins/local/copy-codeblock/copy-codeblock.js}} + +
+ +! 资源文件管理 + +图片文件可以和条目文件分开保存,可以和 html 分开加载 + +资源文件可以放置在 files 文件夹中,通过 ./files/... 的方式引用 + +资源文件的上传下载,用 webdav 好了 + +增加索取所有文件的接口,写入到 tiddlers/files-list-api.tid 文件中 + +
+点击展开文件内容 + +{{files-list-api.tid}} + +
+ +在 wiki 中获取文件列表 + +```tid +\procedure store-file-list() +<$action-setfield + $tiddler="$:/temp/files-list" + text=<> + type="application/json" +/> +\end + +<$button> + <$action-sendmessage + $message="tm-http-request" + url="./api/files" + method="GET" + oncompletion=<> + /> + 刷新文件列表 + + +
<$text text={{$:/temp/files-list}}/>
+``` + -- cgit v1.2.3