mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-11 15:22:29 +02:00
feat(v2): support custom description for blog-only mode (#2359)
* feat: support custom description on blog page resolve conflicts * feat(v2): allow additional props to pass to route components resolve conflicts * Update blogDescription feature * Update doc for blogDescription * Remove test blogDescription config * Fix blogDescription schema validation * Fix minor errors Co-authored-by: Xuqian <zxuqian@163.com>
This commit is contained in:
parent
1db3fbb564
commit
4af25cd597
6 changed files with 32 additions and 3 deletions
|
@ -20,6 +20,7 @@ export const DEFAULT_OPTIONS = {
|
|||
blogTagsListComponent: '@theme/BlogTagsListPage',
|
||||
blogPostComponent: '@theme/BlogPostPage',
|
||||
blogListComponent: '@theme/BlogListPage',
|
||||
blogDescription: 'Blog',
|
||||
postsPerPage: 10,
|
||||
include: ['*.md', '*.mdx'],
|
||||
routeBasePath: 'blog',
|
||||
|
@ -42,6 +43,9 @@ export const PluginOptionSchema = Joi.object({
|
|||
blogTagsPostsComponent: Joi.string().default(
|
||||
DEFAULT_OPTIONS.blogTagsPostsComponent,
|
||||
),
|
||||
blogDescription: Joi.string()
|
||||
.allow('')
|
||||
.default(DEFAULT_OPTIONS.blogDescription),
|
||||
showReadingTime: Joi.bool().default(DEFAULT_OPTIONS.showReadingTime),
|
||||
remarkPlugins: Joi.array()
|
||||
.items(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue