From 0c199975f2d469ecdfd7efcf2ddd16ffa1dc492b Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 17 Aug 2023 07:55:28 +0000
Subject: [PATCH] various path fixes for links to extensions, fix relative paths in links

---
 content/features/table of contents.md |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/content/features/table of contents.md b/content/features/table of contents.md
index 5445771..f058573 100644
--- a/content/features/table of contents.md
+++ b/content/features/table of contents.md
@@ -1,5 +1,24 @@
 ---
 title: "Table of Contents"
 tags:
-- component
----
\ No newline at end of file
+  - component
+  - plugin/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.
+
+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.
+
+> [!info]
+> This feature requires both `Plugin.TableOfContents` in your `quartz.config.ts` and `Component.TableOfContents` in your `quartz.layout.ts` to function correctly.
+
+## 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 })`
+- 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`

--
Gitblit v1.10.0