Skip to content

Commit

Permalink
feat(docs,blog,pages): add support for "unlisted" front matter - hide…
Browse files Browse the repository at this point in the history
… md content in production (#8004)

Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
  • Loading branch information
jodyheavener and slorber committed Nov 3, 2022
1 parent 7a023a2 commit 683ba3d
Show file tree
Hide file tree
Showing 131 changed files with 2,449 additions and 303 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ exports[`blog plugin works on blog tags without pagination 1`] = `
},
],
"permalink": "/blog/tags/tag-1",
"unlisted": false,
},
"/blog/tags/tag-2": {
"items": [
Expand Down Expand Up @@ -57,6 +58,33 @@ exports[`blog plugin works on blog tags without pagination 1`] = `
},
],
"permalink": "/blog/tags/tag-2",
"unlisted": false,
},
"/blog/tags/unlisted": {
"items": [
"/another/blog-with-tags-unlisted",
],
"label": "unlisted",
"pages": [
{
"items": [
"/another/blog-with-tags-unlisted",
],
"metadata": {
"blogDescription": "Blog",
"blogTitle": "Blog",
"nextPage": undefined,
"page": 1,
"permalink": "/blog/tags/unlisted",
"postsPerPage": 1,
"previousPage": undefined,
"totalCount": 1,
"totalPages": 1,
},
},
],
"permalink": "/blog/tags/unlisted",
"unlisted": false,
},
}
`;
Expand Down Expand Up @@ -106,6 +134,7 @@ exports[`blog plugin works with blog tags 1`] = `
},
],
"permalink": "/blog/tags/tag-1",
"unlisted": false,
},
"/blog/tags/tag-2": {
"items": [
Expand Down Expand Up @@ -133,6 +162,33 @@ exports[`blog plugin works with blog tags 1`] = `
},
],
"permalink": "/blog/tags/tag-2",
"unlisted": false,
},
"/blog/tags/unlisted": {
"items": [
"/another/blog-with-tags-unlisted",
],
"label": "unlisted",
"pages": [
{
"items": [
"/another/blog-with-tags-unlisted",
],
"metadata": {
"blogDescription": "Blog",
"blogTitle": "Blog",
"nextPage": undefined,
"page": 1,
"permalink": "/blog/tags/unlisted",
"postsPerPage": 2,
"previousPage": undefined,
"totalCount": 1,
"totalPages": 1,
},
},
],
"permalink": "/blog/tags/unlisted",
"unlisted": false,
},
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function testGenerateFeeds(
);

await createBlogFeedFiles({
blogPosts: blogPosts.filter((post) => !post.metadata.frontMatter.draft),
blogPosts,
options,
siteConfig: context.siteConfig,
outDir: context.outDir,
Expand Down

0 comments on commit 683ba3d

Please sign in to comment.