mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
feat(v2): create docusaurus-content-blog plugin draft
This commit is contained in:
parent
211e04f409
commit
e5b7daef33
8 changed files with 95 additions and 41 deletions
|
@ -11,7 +11,7 @@ async function genRoutesConfig({
|
|||
siteConfig = {},
|
||||
docsMetadatas = {},
|
||||
pagesMetadatas = [],
|
||||
blogMetadatas = [],
|
||||
contentsStore = {},
|
||||
}) {
|
||||
const {docsUrl, baseUrl} = siteConfig;
|
||||
function genDocsRoute(metadata) {
|
||||
|
@ -138,7 +138,11 @@ async function genRoutesConfig({
|
|||
`const routes = [
|
||||
${pagesMetadatas.map(genPagesRoute).join(',')},
|
||||
${docsRoutes},
|
||||
${blogMetadatas.map(genBlogRoute).join(',')},
|
||||
${
|
||||
contentsStore.blog
|
||||
? contentsStore.blog.contents.map(genBlogRoute).join(',')
|
||||
: ''
|
||||
},
|
||||
${notFoundRoute}\n];\n` +
|
||||
`export default routes;\n`
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue