mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-23 22:17:00 +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
|
@ -90,6 +90,10 @@ declare module '@docusaurus/plugin-content-blog' {
|
|||
* Marks the post as draft and excludes it from the production build.
|
||||
*/
|
||||
draft?: boolean;
|
||||
/**
|
||||
* Marks the post as unlisted and visibly hides it unless directly accessed.
|
||||
*/
|
||||
unlisted?: boolean;
|
||||
/**
|
||||
* Will override the default publish date inferred from git/filename. Yaml
|
||||
* only converts standard yyyy-MM-dd format to dates, so this may stay as a
|
||||
|
@ -222,6 +226,10 @@ declare module '@docusaurus/plugin-content-blog' {
|
|||
readonly frontMatter: BlogPostFrontMatter & {[key: string]: unknown};
|
||||
/** Tags, normalized. */
|
||||
readonly tags: Tag[];
|
||||
/**
|
||||
* Marks the post as unlisted and visibly hides it unless directly accessed.
|
||||
*/
|
||||
readonly unlisted: boolean;
|
||||
};
|
||||
/**
|
||||
* @returns The edit URL that's directly plugged into metadata.
|
||||
|
@ -407,9 +415,15 @@ declare module '@docusaurus/plugin-content-blog' {
|
|||
}
|
||||
>;
|
||||
|
||||
export type BlogSidebarItem = {
|
||||
title: string;
|
||||
permalink: string;
|
||||
unlisted: boolean;
|
||||
};
|
||||
|
||||
export type BlogSidebar = {
|
||||
title: string;
|
||||
items: {title: string; permalink: string}[];
|
||||
items: BlogSidebarItem[];
|
||||
};
|
||||
|
||||
export type BlogContent = {
|
||||
|
@ -428,6 +442,7 @@ declare module '@docusaurus/plugin-content-blog' {
|
|||
/** Blog post permalinks. */
|
||||
items: string[];
|
||||
pages: BlogPaginated[];
|
||||
unlisted: boolean;
|
||||
};
|
||||
|
||||
export type BlogPost = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue