base path refactor, more docs

This commit is contained in:
Jacky Zhao 2023-07-13 00:19:35 -07:00
parent 08f8e3b4a4
commit 906f91f8ee
37 changed files with 1861 additions and 156 deletions
quartz/plugins/transformers

View file

@ -3,6 +3,7 @@ import { Root } from "mdast"
import { visit } from "unist-util-visit"
import { toString } from "mdast-util-to-string"
import { slug as slugAnchor } from 'github-slugger'
import { CanonicalSlug } from "../../path"
export interface Options {
maxDepth: 1 | 2 | 3 | 4 | 5 | 6,
@ -19,7 +20,7 @@ const defaultOptions: Options = {
interface TocEntry {
depth: number,
text: string,
slug: string
slug: CanonicalSlug
}
export const TableOfContents: QuartzTransformerPlugin<Partial<Options> | undefined> = (userOpts) => {