From 1929241a62b67ebd9cc9831e372ab321874d03d1 Mon Sep 17 00:00:00 2001
From: Eiko Wagenknecht <git@eiko-wagenknecht.de>
Date: Fri, 23 Feb 2024 20:07:53 +0000
Subject: [PATCH] docs: update plugin documentation (#888)
---
docs/features/table of contents.md | 22 +++++++---------------
1 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/docs/features/table of contents.md b/docs/features/table of contents.md
index 0298ffa..4ecccc9 100644
--- a/docs/features/table of contents.md
+++ b/docs/features/table of contents.md
@@ -2,25 +2,17 @@
title: "Table of Contents"
tags:
- component
- - plugin/transformer
+ - feature/transformer
---
-Quartz can automatically generate a table of contents from a list of headings on each page. It will also show you your current scroll position on the site by marking headings you've scrolled through with a different colour.
+Quartz can automatically generate a table of contents (TOC) from a list of headings on each page. It will also show you your current scrolling position on the page by highlighting headings you've scrolled through with a different color.
-By default, it will show all headers from H1 (`# Title`) all the way to H3 (`### Title`) and will only show the table of contents if there is more than 1 header on the page.
-You can also hide the table of contents on a page by adding `enableToc: false` to the frontmatter for that page.
+You can hide the TOC on a page by adding `enableToc: false` to the frontmatter for that page.
-> [!info]
-> This feature requires both `Plugin.TableOfContents` in your `quartz.config.ts` and `Component.TableOfContents` in your `quartz.layout.ts` to function correctly.
+By default, the TOC shows all headings from H1 (`# Title`) to H3 (`### Title`) and is only displayed if there is more than one heading on the page.
## Customization
-- Removing table of contents: remove all instances of `Plugin.TableOfContents()` from `quartz.config.ts`. and `Component.TableOfContents()` from `quartz.layout.ts`
-- Changing the max depth: pass in a parameter to `Plugin.TableOfContents({ maxDepth: 4 })`
-- Changing the minimum number of entries in the Table of Contents before it renders: pass in a parameter to `Plugin.TableOfContents({ minEntries: 3 })`
-- Collapse the table of content by default: pass in a parameter to `Plugin.TableOfContents({ collapseByDefault: true })`
-- Component: `quartz/components/TableOfContents.tsx`
-- Style:
- - Modern (default): `quartz/components/styles/toc.scss`
- - Legacy Quartz 3 style: `quartz/components/styles/legacyToc.scss`
-- Script: `quartz/components/scripts/toc.inline.ts`
+The table of contents is a functionality of the [[TableOfContents]] plugin. See the plugin page for more customization options.
+
+It also needs the `TableOfContents` component, which is displayed in the right sidebar by default. You can change this by customizing the [[layout]]. The TOC component can be configured with the `layout` parameter, which can either be `modern` (default) or `legacy`.
--
Gitblit v1.10.0