docusaurus/website/docs
Erick Zhao c86dfbda61
feat(v2): allow specifying TOC max depth (themeConfig + frontMatter) (#5578)
* feat: add all TOC levels to MDX loader

* feat: add theme-level config for heading depth

* test: add remark MDX loader test

* fix: limit maxDepth validation to H2 - H6

* refactor: set default `maxDepth` using `joi`

* refactor: `maxDepth` -> `maxHeadingLevel

* refactor: invert underlying TOC depth API

* refactor: make TOC algorithm level-aware

* feat: add support for per-doc TOC heading levels

* feat: support document-level heading levels for blog

* fix: correct validation for toc level frontmatter

* fix: ensure TOC doesn't generate redundant DOM

* perf: simpler TOC heading search alg

* docs: document heading level props for `TOCInline`

* Update website/docs/guides/markdown-features/markdown-features-inline-toc.mdx

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* docs: fix docs (again)

* create dedicated  test file for heading searching logic: exhaustive tests will be simpler to write

* toc search: add real-world test

* fix test

* add dogfooding tests for toc min/max

* add test for min/max toc frontmatter

* reverse min/max order

* add theme minHeadingLevel + tests

* simpler TOC rendering logic

* simplify TOC implementation (temp, WIP)

* reverse unnatural order for minHeadingLevel/maxHeadingLevel

* add TOC dogfooding tests to all content plugins

* expose toc min/max heading level frontmatter to all 3 content plugins

* refactor blogLayout: accept toc ReactElement directly

* move toc utils to theme-common

* add tests for filterTOC

* create new generic TOCItems component

* useless css file copied

* fix toc highlighting className conflicts

* update doc

* fix types

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-09-29 11:19:11 +02:00
..
_partials feat(v2): generalize usage of _ prefix convention to exclude content files/folders (#5173) 2021-07-15 13:21:41 +02:00
api feat(v2): allow specifying TOC max depth (themeConfig + frontMatter) (#5578) 2021-09-29 11:19:11 +02:00
assets refactor(v2): async md image transformer + pathname protocol as an escape hatch (#3087) 2020-07-21 17:45:06 +02:00
guides feat(v2): allow specifying TOC max depth (themeConfig + frontMatter) (#5578) 2021-09-29 11:19:11 +02:00
i18n docs(website): document npm2yarn plugin + use new Tabs API everywhere (#5590) 2021-09-22 12:25:21 +02:00
migration docs: fix more references to Discord channels (#5585) 2021-09-19 09:45:21 +03:00
blog.mdx docs(website): document npm2yarn plugin + use new Tabs API everywhere (#5590) 2021-09-22 12:25:21 +02:00
browser-support.md docs(v2): add browsers support documentation (#4758) 2021-05-11 11:03:05 +02:00
cli.md feat(v2): generalize usage of _ prefix convention to exclude content files/folders (#5173) 2021-07-15 13:21:41 +02:00
configuration.md docs(v2): use explicit heading IDs (#4460) 2021-03-19 11:00:41 +01:00
deployment.mdx docs(website): document npm2yarn plugin + use new Tabs API everywhere (#5590) 2021-09-22 12:25:21 +02:00
docusaurus-core.md refactor(core): replace useDocusaurusContext().isClient by useIsBrowser() (#5349) 2021-08-12 19:02:29 +02:00
installation.md feat(plugin-blog): multi-authors support + authors.yml global configuration (#5396) 2021-08-26 12:21:58 +02:00
introduction.md docs: update all Discord links (#5581) 2021-09-17 21:25:31 +03:00
lifecycle-apis.md feat(v2): plugins injectHtmlTags + configureWebpack should receive content loaded (#5037) 2021-06-22 17:36:51 +02:00
playground.mdx feat: docusaurus.new + improved StackBlitz playground (#5235) 2021-07-28 19:27:58 +02:00
presets.md docs: remove docusaurus-preset-name from preset doc (#5372) 2021-08-17 19:38:35 +02:00
search.md docs: add additional search options, typesense and local search (#5489) 2021-09-22 17:41:27 +02:00
static-assets.md docs(v2): use explicit heading IDs (#4460) 2021-03-19 11:00:41 +01:00
styling-layout.md docs: update docusaurus-plugin-sass instructions (#5352) 2021-08-13 12:47:13 +02:00
typescript-support.md fix(module-type-aliases): move @type packages to dependencies (#5601) 2021-09-22 14:49:25 +02:00
using-plugins.md docs(v2): fix typo in code block on Using plugins page (#4910) 2021-06-05 17:24:45 +03:00
using-themes.md feat(v2): generalize usage of _ prefix convention to exclude content files/folders (#5173) 2021-07-15 13:21:41 +02:00