mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-14 01:27:35 +02:00
feat(v2): inline table-of-contents + refactor TOC (#3904)
* Add TOCInline theme component * Add TOCInline theme component doc + migration guide * remove useless getPathsToWatch on classic theme * rename rightToc to toc * add temp theme-bootstrap TOCInline comp to fix build issue
This commit is contained in:
parent
b11c24b752
commit
41ef333e47
28 changed files with 206 additions and 36 deletions
|
@ -46,7 +46,7 @@ declare module '@docusaurus/plugin-content-docs-types' {
|
|||
}
|
||||
|
||||
declare module '@theme/DocItem' {
|
||||
import type {MarkdownRightTableOfContents} from '@docusaurus/types';
|
||||
import type {TOCItem} from '@docusaurus/types';
|
||||
|
||||
export type DocumentRoute = {
|
||||
readonly component: () => JSX.Element;
|
||||
|
@ -80,7 +80,7 @@ declare module '@theme/DocItem' {
|
|||
readonly content: {
|
||||
readonly frontMatter: FrontMatter;
|
||||
readonly metadata: Metadata;
|
||||
readonly rightToc: readonly MarkdownRightTableOfContents[];
|
||||
readonly toc: readonly TOCItem[];
|
||||
(): JSX.Element;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue