No description
Find a file
saberzero1 c72b20a06f
chore: centralize type declarations and standardize tooling config
- Update types/globals.d.ts with centralized type declarations
- Add .prettierignore, update .eslintrc.json with triple-slash-reference override
- Remove duplicate scripts.d.ts/styles.d.ts if present
2026-03-16 18:55:26 +01:00
.github/workflows Initial commit 2026-02-09 23:00:25 +01:00
dist fix: add build-time deps for DTS generation 2026-03-14 22:26:14 +01:00
src chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01: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 fix: update types/utils lockfile to commits with dist/ 2026-03-14 22:44:42 +01:00
package.json chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
README.md docs: update README for v5 unified config system 2026-02-25 16:07:03 +01:00
tsconfig.json chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
tsup.config.ts fix: compile SCSS via sass instead of raw text to prevent lightningcss errors 2026-02-26 16:44:51 +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