mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 05:28:43 +02:00
feat(docs,blog,pages): add support for "unlisted" front matter - hide md content in production (#8004)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
7a023a2c41
commit
683ba3d2a0
131 changed files with 2449 additions and 303 deletions
|
@ -23,6 +23,11 @@ function toGlobalDataDoc(doc: DocMetadata): GlobalDoc {
|
|||
return {
|
||||
id: doc.unversionedId,
|
||||
path: doc.permalink,
|
||||
|
||||
// optimize global data size: do not add unlisted: false/undefined
|
||||
...(doc.unlisted && {unlisted: doc.unlisted}),
|
||||
|
||||
// TODO optimize size? remove attribute when no sidebar (breaking change?)
|
||||
sidebar: doc.sidebar,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue