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:
Sébastien Lorber 2021-06-24 18:04:16 +02:00 committed by GitHub
parent f47826297c
commit 364051f232
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 187 additions and 83 deletions

View file

@ -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,
),