mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
feat(plugin-docs): docs sidebar item link: support "autoAddBaseUrl" attribute (#7949)
This commit is contained in:
parent
53bb0307dd
commit
de526e1ab2
4 changed files with 24 additions and 4 deletions
|
@ -44,6 +44,7 @@ export type SidebarItemLink = SidebarItemBase & {
|
|||
type: 'link';
|
||||
href: string;
|
||||
label: string;
|
||||
autoAddBaseUrl?: boolean;
|
||||
};
|
||||
|
||||
export type SidebarItemAutogenerated = SidebarItemBase & {
|
||||
|
|
|
@ -59,6 +59,7 @@ const sidebarItemHtmlSchema = sidebarItemBaseSchema.append<SidebarItemHtml>({
|
|||
const sidebarItemLinkSchema = sidebarItemBaseSchema.append<SidebarItemLink>({
|
||||
type: 'link',
|
||||
href: URISchema.required(),
|
||||
autoAddBaseUrl: Joi.boolean(),
|
||||
label: Joi.string()
|
||||
.required()
|
||||
.messages({'any.unknown': '"label" must be a string'}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue