mirror of
https://github.com/jackyzha0/quartz
synced 2026-11-27 22:14:40 +01:00
Audit of the docs against 5.1 (release notes, core source, plugins) and fixes: - getting-started: 5.0 → 5.1 upgrade section (plugin doctor --fix, line breaks, heading ids, Bases 1.2, permalinks, frontmatter, CI, GFM before OFM), New in 5.1, git pull upstream v5, no redundant install steps - advanced: new plugin manifest reference (dependencies, defaultOrder, configSchema/optionSchema, deprecated, components…), making plugins (BuildCtx, emitters, page types, peer dependencies, imports), creating components (./components subpath, script loading, render/prefetch contract), capabilities, architecture, paths - cli: --directory is the content folder; build/sync flags and behaviour (sync force-pushes); plugin add from npm - configuration, layout, features and plugin pages: nested colors, built-ins, wikilinks/heading anchors, Obsidian compatibility (OFM 2.0), correct defaults and options, Bases 1.2, stacked pages, og-image v5 API; new pages for Excalidraw, TTRPG maps and themes
2.4 KiB
2.4 KiB
title, description, tags, image, repository, enabled, required
| title | description | tags | image | repository | enabled | required | ||
|---|---|---|---|---|---|---|---|---|
| TableOfContents | Generates and renders a table of contents from headings. |
|
https://images.unsplash.com/photo-1768527338896-3765921e992d | [quartz-community/table-of-contents](https://github.com/quartz-community/table-of-contents) | true | false |
This plugin generates a table of contents (TOC) for Markdown documents. See table of contents for more information.
Note
For information on how to add, remove or configure plugins, see the configuration#Plugins page.
This plugin accepts the following configuration options:
maxDepth: Limits the depth of headings included in the TOC, ranging from1(top level headings only) to6(all heading levels). Default is3.minEntries: The TOC is only shown when it has more than this many entries. Default is1(a page needs at least two headings).showByDefault: Iftrue(default), the TOC should be displayed by default. Can be overridden per page with theenableTocfrontmatter key.collapseByDefault: Iftrue, the TOC will start in a collapsed state. Default isfalse.layout: The visual layout of the TOC component. Can be"modern"or"legacy". Default is"modern".
As in Obsidian's outline, headings inside blockquotes and callouts are left out. Entries link to the heading ids that GitHubFlavoredMarkdown gives the headings (read from the rendered headings, with the same slug function as a fallback), so they always match, including for repeated headings (-1, -2).
One plugin entry provides both the transformer that collects the headings and the component that displays them; its layout places the component:
Default options
- source: "@quartz-community/table-of-contents"
enabled: true
options:
maxDepth: 3
minEntries: 1
showByDefault: true
collapseByDefault: false
layout: modern
order: 50
layout:
position: right
priority: 30
API
- Category: Transformer, Component
- Function names:
ExternalPlugin.TableOfContents()(component),ExternalPlugin.TableOfContentsTransformer()(transformer). - Source:
quartz-community/table-of-contents - Install:
npx quartz plugin add @quartz-community/table-of-contents(included in the default configuration)