@@ -3,6 +3,7 @@ import type nprogress from 'astro-nprogress'
33import type { Props as SEO } from 'astro-seo'
44import type { glob } from 'astro/loaders'
55import type { SetRequiredDeep } from 'type-fest'
6+ import type { Schema } from './collection'
67import type { ArtConfig , NavItem , ProjectItem } from './types'
78import path from 'node:path'
89import { defu } from 'defu'
@@ -190,24 +191,14 @@ export interface Config {
190191 */
191192 pathStyle ?: 'collection/id' | 'id'
192193 /**
193- * Table of contents (TOC) generation for posts
194+ * Table of contents (TOC) generation for all content
195+ *
196+ * NOTE: this is just a default config for all content, can be overridden in
197+ * specific content frontmatter
198+ *
199+ * @default { enable: true, range: [2, 4] }
194200 */
195- toc ?: {
196- /**
197- * Enable or disable the table of contents (TOC) generation for posts.
198- *
199- * @default true
200- */
201- enable ?: boolean
202- /**
203- * The heading levels to include in the TOC.
204- *
205- * @example [2, 4] will include headings from h2 to h4.
206- *
207- * @default [2, 4]
208- */
209- range ?: [ number , number ]
210- }
201+ toc ?: Partial < Schema [ 'toc' ] >
211202 }
212203 /**
213204 * Define content collections
0 commit comments