mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-23 14:06:59 +02:00
feat(theme-classic): allow specifying width/height in logo (#5770)
* feat: changed the logo properties to allow width/height specification * fixup! feat: changed the logo properties to allow width/height specification * fixup! feat: changed the logo properties to allow width/height specification * Rework: add fields to logo object * Fix * More fixes * Wrong width! * No need for optional chaining * Doc writeup Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
This commit is contained in:
parent
895c848065
commit
41ef9daafd
8 changed files with 66 additions and 4 deletions
|
@ -290,6 +290,8 @@ const ThemeConfigSchema = Joi.object({
|
|||
alt: Joi.string().allow(''),
|
||||
src: Joi.string().required(),
|
||||
srcDark: Joi.string(),
|
||||
width: Joi.alternatives().try(Joi.string(), Joi.number()),
|
||||
height: Joi.alternatives().try(Joi.string(), Joi.number()),
|
||||
href: Joi.string(),
|
||||
target: Joi.string(),
|
||||
}),
|
||||
|
@ -300,6 +302,9 @@ const ThemeConfigSchema = Joi.object({
|
|||
alt: Joi.string().allow(''),
|
||||
src: Joi.string(),
|
||||
srcDark: Joi.string(),
|
||||
// TODO infer this from reading the image
|
||||
width: Joi.alternatives().try(Joi.string(), Joi.number()),
|
||||
height: Joi.alternatives().try(Joi.string(), Joi.number()),
|
||||
href: Joi.string(),
|
||||
}),
|
||||
copyright: Joi.string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue