mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 05:28:43 +02:00
refactor(content-docs): refactor sidebars, Joi validation, generator rework, expose config types (#5678)
This commit is contained in:
parent
543011c9d2
commit
8d92e9bcf5
41 changed files with 1806 additions and 1880 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
declare module '@docusaurus/plugin-content-docs' {
|
||||
export type Options = Partial<import('./types').PluginOptions>;
|
||||
export type SidebarsConfig = import('./sidebars/types').SidebarsConfig;
|
||||
}
|
||||
|
||||
// TODO public api surface types should rather be exposed as "@docusaurus/plugin-content-docs"
|
||||
|
@ -29,30 +30,11 @@ declare module '@docusaurus/plugin-content-docs-types' {
|
|||
docsSidebars: PropSidebars;
|
||||
};
|
||||
|
||||
type PropsSidebarItemBase = {
|
||||
className?: string;
|
||||
customProps?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type PropSidebarItemLink = PropsSidebarItemBase & {
|
||||
type: 'link';
|
||||
href: string;
|
||||
label: string;
|
||||
};
|
||||
|
||||
export type PropSidebarItemCategory = PropsSidebarItemBase & {
|
||||
type: 'category';
|
||||
label: string;
|
||||
items: PropSidebarItem[];
|
||||
collapsed: boolean;
|
||||
collapsible: boolean;
|
||||
};
|
||||
|
||||
export type PropSidebarItem = PropSidebarItemLink | PropSidebarItemCategory;
|
||||
|
||||
export type PropSidebars = {
|
||||
[sidebarId: string]: PropSidebarItem[];
|
||||
};
|
||||
export type PropSidebarItemLink = import('./sidebars/types').SidebarItemLink;
|
||||
export type PropSidebarItemCategory =
|
||||
import('./sidebars/types').PropSidebarItemCategory;
|
||||
export type PropSidebarItem = import('./sidebars/types').PropSidebarItem;
|
||||
export type PropSidebars = import('./sidebars/types').PropSidebars;
|
||||
|
||||
export type PropTagDocListDoc = {
|
||||
id: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue