Obsidian 自动目录插件使用教程
obsidian-automatic-table-of-contents💠 An Obsidian plugin to create a table of contents in a note, that updates itself when the note changes项目地址:https://gitcode.com/gh_mirrors/ob/obsidian-automatic-table-of-contents
1. 项目的目录结构及介绍
Obsidian 自动目录插件的目录结构如下:
obsidian-automatic-table-of-contents/
├── .github/
├── images/
├── test/
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── main.js
├── manifest.json
├── package-lock.json
├── package.json
目录结构介绍
.github/
: GitHub 相关文件,如 issue 模板等。images/
: 项目使用的图片资源。test/
: 测试文件目录。.gitignore
: Git 忽略文件配置。CONTRIBUTING.md
: 贡献指南。LICENSE
: 项目许可证。README.md
: 项目说明文档。main.js
: 项目主文件。manifest.json
: Obsidian 插件清单文件。package-lock.json
: npm 锁定文件。package.json
: npm 配置文件。
2. 项目的启动文件介绍
项目的启动文件是 main.js
。该文件负责插件的主要功能,包括自动生成和更新目录。
main.js 主要功能
监听笔记变化,自动更新目录。提供命令面板中的相关命令。
3. 项目的配置文件介绍
项目的配置文件主要是 manifest.json
和 package.json
。
manifest.json
manifest.json
是 Obsidian 插件的清单文件,包含插件的基本信息和配置。
{
"id": "obsidian-automatic-table-of-contents",
"name": "Automatic Table Of Contents",
"version": "1.0.0",
"minAppVersion": "0.12.0",
"description": "An Obsidian plugin to create a table of contents in a note that updates itself when the note changes.",
"author": "johansatge",
"authorUrl": "https://github.com/johansatge",
"isDesktopOnly": false
}
package.json
package.json
是 npm 配置文件,包含项目的依赖和脚本等信息。
{
"name": "obsidian-automatic-table-of-contents",
"version": "1.0.0",
"description": "An Obsidian plugin to create a table of contents in a note that updates itself when the note changes.",
"main": "main.js",
"scripts": {
"dev": "rollup --config rollup.config.js -w",
"build": "rollup --config rollup.config.js"
},
"keywords": [
"obsidian",
"plugin",
"table of contents"
],
"author": "johansatge",
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"obsidian": "^0.12.0",
"rollup": "^2.38.0"
}
}
通过以上介绍,您可以更好地理解和使用 Obsidian 自动目录插件。
obsidian-automatic-table-of-contents💠 An Obsidian plugin to create a table of contents in a note, that updates itself when the note changes项目地址:https://gitcode.com/gh_mirrors/ob/obsidian-automatic-table-of-contents