From f67356c3d2d609a8a6b674ac650fc41d6dfb4cc7 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 11 Nov 2023 20:02:34 +0000
Subject: [PATCH] lint: format
---
quartz/plugins/transformers/toc.ts | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/quartz/plugins/transformers/toc.ts b/quartz/plugins/transformers/toc.ts
index be006f6..87c5802 100644
--- a/quartz/plugins/transformers/toc.ts
+++ b/quartz/plugins/transformers/toc.ts
@@ -8,12 +8,14 @@
maxDepth: 1 | 2 | 3 | 4 | 5 | 6
minEntries: 1
showByDefault: boolean
+ collapseByDefault: boolean
}
const defaultOptions: Options = {
maxDepth: 3,
minEntries: 1,
showByDefault: true,
+ collapseByDefault: false,
}
interface TocEntry {
@@ -54,6 +56,7 @@
...entry,
depth: entry.depth - highestDepth,
}))
+ file.data.collapseToc = opts.collapseByDefault
}
}
}
@@ -66,5 +69,6 @@
declare module "vfile" {
interface DataMap {
toc: TocEntry[]
+ collapseToc: boolean
}
}
--
Gitblit v1.10.0