mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-17 19:16:58 +02:00
refactor(core): refactor routes generation logic (#7054)
* refactor(core): refactor routes generation logic * fixes
This commit is contained in:
parent
e31e91ef47
commit
77662260f8
19 changed files with 551 additions and 506 deletions
|
@ -292,19 +292,15 @@ export default async function pluginContentBlog(
|
|||
exact: true,
|
||||
modules: {
|
||||
sidebar: aliasedSource(sidebarProp),
|
||||
items: items.map((postID) =>
|
||||
// To tell routes.js this is an import and not a nested object
|
||||
// to recurse.
|
||||
({
|
||||
content: {
|
||||
__import: true,
|
||||
path: blogItemsToMetadata[postID]!.source,
|
||||
query: {
|
||||
truncated: true,
|
||||
},
|
||||
items: items.map((postID) => ({
|
||||
content: {
|
||||
__import: true,
|
||||
path: blogItemsToMetadata[postID]!.source,
|
||||
query: {
|
||||
truncated: true,
|
||||
},
|
||||
}),
|
||||
),
|
||||
},
|
||||
})),
|
||||
metadata: aliasedSource(pageMetadataPath),
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue