mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-15 17:22:35 +02:00
feat(v2): new docs edit options: editCurrentVersion + editLocalizedDocs (#3949)
* editCurrentVersion initial poc * ensure edit url allows to edit localized docs * Add editLocalizedDocs option * keep editing current version in dev (more convenient)
This commit is contained in:
parent
2791ccc4cf
commit
b5c46bd1d9
13 changed files with 394 additions and 59 deletions
|
@ -37,6 +37,8 @@ export const DEFAULT_OPTIONS: Omit<PluginOptions, 'id'> = {
|
|||
disableVersioning: false,
|
||||
lastVersion: undefined,
|
||||
versions: {},
|
||||
editCurrentVersion: false,
|
||||
editLocalizedDocs: false,
|
||||
};
|
||||
|
||||
const VersionOptionsSchema = Joi.object({
|
||||
|
@ -51,6 +53,8 @@ const VersionsOptionsSchema = Joi.object()
|
|||
export const OptionsSchema = Joi.object({
|
||||
path: Joi.string().default(DEFAULT_OPTIONS.path),
|
||||
editUrl: URISchema,
|
||||
editCurrentVersion: Joi.boolean().default(DEFAULT_OPTIONS.editCurrentVersion),
|
||||
editLocalizedDocs: Joi.boolean().default(DEFAULT_OPTIONS.editLocalizedDocs),
|
||||
routeBasePath: Joi.string()
|
||||
// '' not allowed, see https://github.com/facebook/docusaurus/issues/3374
|
||||
// .allow('') ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue