mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-19 12:07:00 +02:00
misc(v2): rename Blog components
This commit is contained in:
parent
fb56f853af
commit
1827c6f333
3 changed files with 6 additions and 6 deletions
|
@ -24,8 +24,8 @@ const DEFAULT_OPTIONS = {
|
|||
routeBasePath: 'blog', // URL Route.
|
||||
include: ['*.md', '*.mdx'], // Extensions to include.
|
||||
pageCount: 10, // How many entries per page.
|
||||
blogListComponent: '@theme/BlogList',
|
||||
blogItemComponent: '@theme/BlogPost',
|
||||
blogListComponent: '@theme/BlogListPage',
|
||||
blogPostComponent: '@theme/BlogPostPage',
|
||||
};
|
||||
|
||||
class DocusaurusPluginContentBlog {
|
||||
|
@ -113,7 +113,7 @@ class DocusaurusPluginContentBlog {
|
|||
}
|
||||
|
||||
async contentLoaded({content, actions}) {
|
||||
const {blogListComponent, blogItemComponent} = this.options;
|
||||
const {blogListComponent, blogPostComponent} = this.options;
|
||||
const {addRoute, createData} = actions;
|
||||
await Promise.all(
|
||||
content.map(async metadataItem => {
|
||||
|
@ -145,7 +145,7 @@ class DocusaurusPluginContentBlog {
|
|||
|
||||
addRoute({
|
||||
path: permalink,
|
||||
component: blogItemComponent,
|
||||
component: blogPostComponent,
|
||||
exact: true,
|
||||
modules: {
|
||||
content: metadataItem.source,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue