mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-12 22:38:04 +02:00
fix(v2): Allow footer logo at attribute to be empty (#3817)
This commit is contained in:
parent
d25a54f61d
commit
1fafdb0d33
2 changed files with 21 additions and 1 deletions
|
@ -198,6 +198,26 @@ describe('themeConfig', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should allow empty alt tags for the logo image in the footer', () => {
|
||||||
|
const partialConfig = {
|
||||||
|
footer: {
|
||||||
|
logo: {
|
||||||
|
alt: '',
|
||||||
|
src: '/arbitrary-logo.png',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const normalizedConfig = testValidateThemeConfig(partialConfig);
|
||||||
|
|
||||||
|
expect(normalizedConfig).toEqual({
|
||||||
|
...normalizedConfig,
|
||||||
|
footer: {
|
||||||
|
...normalizedConfig.footer,
|
||||||
|
...partialConfig.footer,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
test('should accept valid prism config', () => {
|
test('should accept valid prism config', () => {
|
||||||
const prismConfig = {
|
const prismConfig = {
|
||||||
prism: {
|
prism: {
|
||||||
|
|
|
@ -254,7 +254,7 @@ const ThemeConfigSchema = Joi.object({
|
||||||
footer: Joi.object({
|
footer: Joi.object({
|
||||||
style: Joi.string().equal('dark', 'light').default('light'),
|
style: Joi.string().equal('dark', 'light').default('light'),
|
||||||
logo: Joi.object({
|
logo: Joi.object({
|
||||||
alt: Joi.string(),
|
alt: Joi.string().allow(''),
|
||||||
src: Joi.string(),
|
src: Joi.string(),
|
||||||
href: Joi.string(),
|
href: Joi.string(),
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue