aboutsummaryrefslogtreecommitdiffstats
path: root/tiddlers/tiddlywiki.tid
diff options
context:
space:
mode:
authorshu <nvcsadjkojf@outlook.com>2026-07-26 18:33:43 +0800
committershu <nvcsadjkojf@outlook.com>2026-07-26 18:33:43 +0800
commitc1414f940c1fca93df0c266a3e90c9ff1d7e88c7 (patch)
tree4d613a365905d12699d71b3bfb2f68d2a7089c1c /tiddlers/tiddlywiki.tid
Initial TiddlyWiki setup
Diffstat (limited to 'tiddlers/tiddlywiki.tid')
-rw-r--r--tiddlers/tiddlywiki.tid112
1 files changed, 112 insertions, 0 deletions
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]] 文件,重启服务就可以了
+
+<details>
+<summary>点击展开文件内容</summary>
+
+{{$:/plugins/local/highlight-languages/tiddlywiki.js}}
+
+</details>
+
+! 在侧边增加一个新的 tab
+
+```tid
+title: $:/plugins/local/sidebar/starred
+type: text/vnd.tiddlywiki
+tags: $:/tags/SideBar
+caption: 🍀
+list-after: $:/core/ui/SideBar/More
+
+<div class="tc-sidebar-tab-open">
+
+<$list
+ filter="[tag[🍀]!has[draft.of]sort[title]]"
+ emptyMessage="还没有设置 🍀 标签的条目。"
+>
+<div class="tc-sidebar-tab-open-item">
+<$link/>
+</div>
+</$list>
+
+</div>
+```
+
+! 插件 - 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]]
+
+<details>
+<summary>点击展开文件内容</summary>
+
+{{$:/plugins/local/copy-codeblock/copy-codeblock.js}}
+
+</details>
+
+! 资源文件管理
+
+图片文件可以和条目文件分开保存,可以和 html 分开加载
+
+资源文件可以放置在 files 文件夹中,通过 ./files/... 的方式引用
+
+资源文件的上传下载,用 webdav 好了
+
+增加索取所有文件的接口,写入到 tiddlers/files-list-api.tid 文件中
+
+<details>
+<summary>点击展开文件内容</summary>
+
+{{files-list-api.tid}}
+
+</details>
+
+在 wiki 中获取文件列表
+
+```tid
+\procedure store-file-list()
+<$action-setfield
+ $tiddler="$:/temp/files-list"
+ text=<<data>>
+ type="application/json"
+/>
+\end
+
+<$button>
+ <$action-sendmessage
+ $message="tm-http-request"
+ url="./api/files"
+ method="GET"
+ oncompletion=<<store-file-list>>
+ />
+ 刷新文件列表
+</$button>
+
+<pre><$text text={{$:/temp/files-list}}/></pre>
+```
+