mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 16:17:25 +02:00
feat(blog): add blog pageBasePath plugin option (#9838)
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
This commit is contained in:
parent
cc7f43580c
commit
70ba9d2d01
8 changed files with 113 additions and 21 deletions
|
@ -107,6 +107,7 @@ export default async function pluginContentBlog(
|
|||
blogDescription,
|
||||
blogTitle,
|
||||
blogSidebarTitle,
|
||||
pageBasePath,
|
||||
} = options;
|
||||
|
||||
const baseBlogUrl = normalizeUrl([baseUrl, routeBasePath]);
|
||||
|
@ -121,11 +122,10 @@ export default async function pluginContentBlog(
|
|||
blogListPaginated: [],
|
||||
blogTags: {},
|
||||
blogTagsListPath,
|
||||
blogTagsPaginated: [],
|
||||
};
|
||||
}
|
||||
|
||||
// Colocate next and prev metadata.
|
||||
// Collocate next and prev metadata.
|
||||
listedBlogPosts.forEach((blogPost, index) => {
|
||||
const prevItem = index > 0 ? listedBlogPosts[index - 1] : null;
|
||||
if (prevItem) {
|
||||
|
@ -153,6 +153,7 @@ export default async function pluginContentBlog(
|
|||
blogDescription,
|
||||
postsPerPageOption,
|
||||
basePageUrl: baseBlogUrl,
|
||||
pageBasePath,
|
||||
});
|
||||
|
||||
const blogTags: BlogTags = getBlogTags({
|
||||
|
@ -160,6 +161,7 @@ export default async function pluginContentBlog(
|
|||
postsPerPageOption,
|
||||
blogDescription,
|
||||
blogTitle,
|
||||
pageBasePath,
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue