mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 11:22:30 +02:00
feat(content-docs): draft docs excluded from build & sidebars (#6457)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com> Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
parent
ee4c984bc7
commit
5fb0a2e274
27 changed files with 396 additions and 58 deletions
|
@ -346,6 +346,8 @@ declare module '@docusaurus/plugin-content-docs' {
|
|||
* @see {@link DocMetadata.prev}
|
||||
*/
|
||||
pagination_prev?: string | null;
|
||||
/** Should this doc be excluded from production builds? */
|
||||
draft?: boolean;
|
||||
};
|
||||
|
||||
export type LastUpdateData = {
|
||||
|
@ -390,6 +392,10 @@ declare module '@docusaurus/plugin-content-docs' {
|
|||
slug: string;
|
||||
/** Full URL to this doc, with base URL and version path. */
|
||||
permalink: string;
|
||||
/**
|
||||
* Draft docs will be excluded for production environment.
|
||||
*/
|
||||
draft: boolean;
|
||||
/**
|
||||
* Position in an autogenerated sidebar slice, acquired through front matter
|
||||
* or number prefix.
|
||||
|
@ -597,6 +603,8 @@ declare module '@docusaurus/plugin-content-docs/client' {
|
|||
/** The doc with `slug: /`, or first doc in first sidebar */
|
||||
mainDocId: string;
|
||||
docs: GlobalDoc[];
|
||||
/** Unversioned IDs. In development, this list is empty. */
|
||||
draftIds: string[];
|
||||
sidebars?: {[sidebarId: string]: GlobalSidebar};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue