feat(blog): authors page (#10216)

Co-authored-by: OzakIOne <OzakIOne@users.noreply.github.com>
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
Co-authored-by: slorber <slorber@users.noreply.github.com>
This commit is contained in:
ozaki 2024-08-01 17:30:49 +02:00 committed by GitHub
parent 50f9fce29b
commit f356e29938
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
56 changed files with 1670 additions and 706 deletions

View file

@ -34,6 +34,8 @@ export const DEFAULT_OPTIONS: PluginOptions = {
showReadingTime: true,
blogTagsPostsComponent: '@theme/BlogTagsPostsPage',
blogTagsListComponent: '@theme/BlogTagsListPage',
blogAuthorsPostsComponent: '@theme/Blog/Pages/BlogAuthorsPostsPage',
blogAuthorsListComponent: '@theme/Blog/Pages/BlogAuthorsListPage',
blogPostComponent: '@theme/BlogPostPage',
blogListComponent: '@theme/BlogListPage',
blogArchiveComponent: '@theme/BlogArchivePage',
@ -58,6 +60,7 @@ export const DEFAULT_OPTIONS: PluginOptions = {
processBlogPosts: async () => undefined,
onInlineTags: 'warn',
tags: undefined,
authorsBasePath: 'authors',
onInlineAuthors: 'warn',
};
@ -82,6 +85,12 @@ const PluginOptionSchema = Joi.object<PluginOptions>({
blogTagsPostsComponent: Joi.string().default(
DEFAULT_OPTIONS.blogTagsPostsComponent,
),
blogAuthorsPostsComponent: Joi.string().default(
DEFAULT_OPTIONS.blogAuthorsPostsComponent,
),
blogAuthorsListComponent: Joi.string().default(
DEFAULT_OPTIONS.blogAuthorsListComponent,
),
blogArchiveComponent: Joi.string().default(
DEFAULT_OPTIONS.blogArchiveComponent,
),
@ -157,6 +166,9 @@ const PluginOptionSchema = Joi.object<PluginOptions>({
.disallow('')
.allow(null, false)
.default(() => DEFAULT_OPTIONS.tags),
authorsBasePath: Joi.string()
.default(DEFAULT_OPTIONS.authorsBasePath)
.disallow(''),
onInlineAuthors: Joi.string()
.equal('ignore', 'log', 'warn', 'throw')
.default(DEFAULT_OPTIONS.onInlineAuthors),