mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-23 19:48:54 +02:00
feat(docs, blog): add support for tags.yml
, predefined list of tags (#10137)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com> 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:
parent
1049294ba6
commit
0eb7b64aac
63 changed files with 2597 additions and 722 deletions
|
@ -54,6 +54,8 @@ export const DEFAULT_OPTIONS: Omit<PluginOptions, 'id' | 'sidebarPath'> = {
|
|||
sidebarCollapsible: true,
|
||||
sidebarCollapsed: true,
|
||||
breadcrumbs: true,
|
||||
onInlineTags: 'warn',
|
||||
tags: undefined,
|
||||
};
|
||||
|
||||
const VersionOptionsSchema = Joi.object({
|
||||
|
@ -140,6 +142,13 @@ const OptionsSchema = Joi.object<PluginOptions>({
|
|||
lastVersion: Joi.string().optional(),
|
||||
versions: VersionsOptionsSchema,
|
||||
breadcrumbs: Joi.bool().default(DEFAULT_OPTIONS.breadcrumbs),
|
||||
onInlineTags: Joi.string()
|
||||
.equal('ignore', 'log', 'warn', 'throw')
|
||||
.default(DEFAULT_OPTIONS.onInlineTags),
|
||||
tags: Joi.string()
|
||||
.disallow('')
|
||||
.allow(null, false)
|
||||
.default(() => DEFAULT_OPTIONS.tags),
|
||||
});
|
||||
|
||||
export function validateOptions({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue