No description
Find a file
2026-04-04 01:52:48 +02:00
.github/workflows ci: add dist externals verification step 2026-03-17 19:41:48 +01:00
dist deps: add @quartz-community/utils dependency 2026-04-03 19:33:33 +02:00
src i18n: add translations for 30 locales from Quartz v4 2026-04-04 01:52:48 +02:00
test feat(plugins): table of contents as community plugin 2026-02-09 23:18:16 +01:00
types chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.eslintrc.json chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.gitignore chore: commit dist/ and remove prepare script 2026-03-14 22:01:44 +01:00
.prettierignore chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.prettierrc Initial commit 2026-02-09 23:00:25 +01:00
CHANGELOG.md Initial commit 2026-02-09 23:00:25 +01:00
LICENSE Initial commit 2026-02-09 23:00:25 +01:00
package-lock.json deps: add @quartz-community/utils dependency 2026-04-03 19:33:33 +02:00
package.json deps: add @quartz-community/utils dependency 2026-04-03 19:33:33 +02:00
README.md docs: update README for v5 unified config system 2026-02-25 16:07:03 +01:00
tsconfig.build.json fix: use separate tsconfig for DTS build to avoid vitest dependency 2026-03-22 13:12:01 +01:00
tsconfig.json chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
tsup.config.ts fix: move tsconfig from dts object to top-level option 2026-03-22 13:25:12 +01:00
vitest.config.ts Initial commit 2026-02-09 23:00:25 +01:00

@quartz-community/table-of-contents

Renders an interactive table of contents for pages. Also includes a transformer that extracts heading structure from markdown.

Installation

npx quartz plugin add github:quartz-community/table-of-contents

Usage

plugins:
  - source: github:quartz-community/table-of-contents
    enabled: true

For advanced use cases, you can override in TypeScript:

import * as ExternalPlugin from "./.quartz/plugins";

// Transformer
ExternalPlugin.TableOfContentsTransformer({ maxDepth: 3 });

// Component
ExternalPlugin.TableOfContents({ layout: "modern" });

Configuration

Component Options

Option Type Default Description
layout "modern" | "legacy" "modern" The layout style of the table of contents.

Transformer Options

Option Type Default Description
maxDepth number 3 The maximum heading depth to include in the table of contents (1-6).
minEntries number 1 The minimum number of entries required to display the table of contents.
showByDefault boolean true Whether to show the table of contents by default.
collapseByDefault boolean false Whether to collapse the table of contents by default.

Documentation

See the Quartz documentation for more information.

License

MIT