foam-template/docs/features/链接参考定义.md
2021-12-08 22:31:39 +08:00

31 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 链接参考定义
当你使用`[[维基链接]]`时,[foam-vscode](https://github.com/foambubble/foam/tree/master/packages/foam-vscode)插件在文件底部可以生成[Markdown Link Reference Definitions](https://spec.commonmark.org/0.29/#link-reference-definitions)。
这样做是为了使文件的内容与不直接支持`[[维基链接]]`的各种 Markdown 工具例如解析器、静态站点生成器、VS 代码插件等)兼容。
默认情况下可以禁用此功能就像在foam模板中所做的那样因为你不需要它来导航你的工作区它对于发版和兼容笔记非常有用。
## 示例
下面的例子 :
```md
- [[Graph目录可视化]]
```
...在文件底部生成以下链接引用定义:
```md
[Graph目录可视化]: Graph目录可视化"Graph目录可视化"
```
## 配置
你可以使用 `foam.edit.linkReferenceDefinitions` 来配置定义(参见 [[VS-Code-入门指南]
- `withoutExtensions`(默认):这对某些网络发布工具(例如 GitHub 页面)效果更好
- `withExtensions`:使用基于 Markdown 的标准工具(例如 GitHub Web UI效果更好
- `off`:禁用定义的生成
更改工作区中的设置后,你可以运行 `Foam: Run Janitor (Experimental)` 命令来转换所有现有定义。