github guopenghui/obsidian-quiet-outline 0.3.32

latest releases: 0.3.35, 0.3.34, 0.3.33...
14 days ago

New Feature

Now you can use a template string to customize output text of your headings.

For template {bullet} {num-nest[.]} [{title}]({path}), you can get heading text like - 1.2 [heading title](#heading%20title). So you can generate a TOC of your note.
image

Usage steps:

  1. Edit you template string in setting panel
  2. Open a note
  3. Run command "Copy Current Headings As Text"
  4. Paste text from clipboard to your note.

Syntax

  • title: content of your heading, like heading
  • path: like #heading, used to generate link to this heading
  • num: like 12
  • num-nest[-]: like 1-2-3
  • bullet: just -, used to generate list

Limit

Obsidian will replace spaces in heading to %20, however, github replaces space to - instead. So maybe generated TOC can not be used directly.

eg. For Heading Content:

  • obsidian: #Heading%20Content
  • github: #heading-content

You can find discussions here:

新功能

现在你可以通过模板来自定义导出的标题格式
比如{bullet} {num-nest[.]} [{title}]({path}), 可以得到 - 1.2 [heading title](#heading%20title). 所以可以通过这个来生成 TOC

使用步骤

  1. 在设置面板中编辑模板字符串
  2. 打开一个笔记
  3. 运行命令“Copy Current Headings As Text”
  4. 内容被写到了剪贴板,手动粘贴到笔记中

模板语法

  • title: 标题的内容 heading
  • path: 在内容前面加一个 #, 比如 #heading, 用来生成对标题的链接
  • num: 编号 12
  • num-nest[-]: 嵌套的编号 1-2-3
  • bullet: 仅仅是一个 -, 用来生成列表

限制

Obsidian 会把标题中的空格替换成 %20,而 github 则是替换成 -。所以可能生成的TOC没办法直接在github之类的地方使用

比如对于标题 Heading Content

  • obsidian: #Heading%20Content
  • github: #heading-content

对于这个问题,论坛里面有讨论:

Don't miss a new obsidian-quiet-outline release

NewReleases is sending notifications on new releases.