Obsidian 自动目录插件使用教程

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.jsonpackage.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

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

缪生栋

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值