feat: include tag hierarchies in tag listing, sort tag listing
| | |
| | | : htmlToJsx(fileData.filePath!, tree) |
| | | |
| | | if (tag === "/") { |
| | | const tags = [...new Set(allFiles.flatMap((data) => data.frontmatter?.tags ?? []))] |
| | | const tags = [ |
| | | ...new Set( |
| | | allFiles.flatMap((data) => data.frontmatter?.tags ?? []).flatMap(getAllSegmentPrefixes), |
| | | ), |
| | | ].sort((a, b) => a.localeCompare(b)) |
| | | const tagItemMap: Map<string, QuartzPluginData[]> = new Map() |
| | | for (const tag of tags) { |
| | | tagItemMap.set(tag, allPagesWithTag(tag)) |
| | |
| | | const tags: Set<string> = new Set( |
| | | allFiles.flatMap((data) => data.frontmatter?.tags ?? []).flatMap(getAllSegmentPrefixes), |
| | | ) |
| | | |
| | | // add base tag |
| | | tags.add("index") |
| | | |