mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-14 08:42:31 +02:00
feat(v2): docs version banner configuration option (#5052)
* refactor DocVersionBanner => versionMetadata prop should be forwarded instead of using "useActiveVersion" + global data * docs version banner configuration * add doc for versions.banner * fix tests * improve docs plugin option api doc
This commit is contained in:
parent
f47826297c
commit
364051f232
13 changed files with 187 additions and 83 deletions
|
@ -49,6 +49,7 @@ export const DEFAULT_OPTIONS: Omit<PluginOptions, 'id' | 'sidebarPath'> = {
|
|||
const VersionOptionsSchema = Joi.object({
|
||||
path: Joi.string().allow('').optional(),
|
||||
label: Joi.string().optional(),
|
||||
banner: Joi.string().equal('none', 'unreleased', 'unmaintained').optional(),
|
||||
});
|
||||
|
||||
const VersionsOptionsSchema = Joi.object()
|
||||
|
@ -101,6 +102,7 @@ export const OptionsSchema = Joi.object({
|
|||
showLastUpdateAuthor: Joi.bool().default(
|
||||
DEFAULT_OPTIONS.showLastUpdateAuthor,
|
||||
),
|
||||
// TODO deprecated, excludeNextVersionDocs replaced by includeCurrentVersion
|
||||
excludeNextVersionDocs: Joi.bool().default(
|
||||
DEFAULT_OPTIONS.excludeNextVersionDocs,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue