Obsidian中的標(biāo)簽,到底該如何使用?(第四集 如何批量生成你的標(biāo)簽頁(yè))

## 第一步
?
02:23
?代碼:
```dataviewjs
dv.list(new Set(dv.pages().file.tags))
```
需手動(dòng)將 Dataview 插件設(shè)置中 Enable JavaScript Queries 項(xiàng)打開(kāi)方可運(yùn)行
復(fù)制所有標(biāo)簽
## 第二步
?
03:35
?- 在預(yù)備存放標(biāo)簽頁(yè)的文件夾下建立 All-Tags 文件,Ctrl/Cmd+Shift+V 粘貼
- 查找 "#" 全部替換為 "# ";若使用嵌套標(biāo)簽,再加一步替換 "/" 為 "_"
- 將所需模板代碼復(fù)制粘貼進(jìn) Note Refactor 插件設(shè)置中 Refactored note template 設(shè)置項(xiàng)(注意第一行 Aliases: ["#{{new_note_title}}"] 兩邊的中括號(hào)必須是英文格式?。?!B站評(píng)論區(qū)會(huì)自動(dòng)給改成中文格式!不要直接照搬老師的置頂評(píng)論不然會(huì)出問(wèn)題?。?/li>
---
Aliases: ["#{{new_note_title}}"]
---
# Tag Summary匯總
```add-summary
tags: #{{new_note_title}}
```
# Query語(yǔ)句匯總
```query
tag:#{{new_note_title}}
```
# Dataview匯總
```dataview
list
from #{{new_note_title}}
```
## 第三步
?
05:27
?在 All-Tags文件中 Ctrl+P 運(yùn)行 Note Refactor:Split note by headings H1 命令
若使用嵌套標(biāo)簽,再加一步用Linter替換放標(biāo)簽頁(yè)的 folder 內(nèi) "_" 為 "/"(具體方法見(jiàn) BV11M4y1U76G,如果用命令看清楚一定要選 Lint all files in the current folder !別選錯(cuò)?。?/p>
標(biāo)簽: