mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 13:38:33 +02:00
feat(blog): warn duplicate and inline authors (#10224)
Co-authored-by: OzakIOne <OzakIOne@users.noreply.github.com> Co-authored-by: sebastien <lorber.sebastien@gmail.com>
This commit is contained in:
parent
1405b25fc7
commit
de59621fbb
16 changed files with 299 additions and 21 deletions
|
@ -58,6 +58,7 @@ export const DEFAULT_OPTIONS: PluginOptions = {
|
|||
processBlogPosts: async () => undefined,
|
||||
onInlineTags: 'warn',
|
||||
tags: undefined,
|
||||
onInlineAuthors: 'warn',
|
||||
};
|
||||
|
||||
const PluginOptionSchema = Joi.object<PluginOptions>({
|
||||
|
@ -156,6 +157,9 @@ const PluginOptionSchema = Joi.object<PluginOptions>({
|
|||
.disallow('')
|
||||
.allow(null, false)
|
||||
.default(() => DEFAULT_OPTIONS.tags),
|
||||
onInlineAuthors: Joi.string()
|
||||
.equal('ignore', 'log', 'warn', 'throw')
|
||||
.default(DEFAULT_OPTIONS.onInlineAuthors),
|
||||
}).default(DEFAULT_OPTIONS);
|
||||
|
||||
export function validateOptions({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue