mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-15 17:22:35 +02:00
feat(search-algolia): allow disabling search page and configuring path (#6692)
This commit is contained in:
parent
3629b5ab39
commit
53c2c118c4
7 changed files with 55 additions and 27 deletions
|
@ -18,6 +18,7 @@ export const DEFAULT_CONFIG = {
|
|||
appId: 'BH4D9OD16A',
|
||||
|
||||
searchParameters: {},
|
||||
searchPagePath: 'search',
|
||||
};
|
||||
|
||||
export const Schema = Joi.object({
|
||||
|
@ -32,6 +33,10 @@ export const Schema = Joi.object({
|
|||
searchParameters: Joi.object()
|
||||
.default(DEFAULT_CONFIG.searchParameters)
|
||||
.unknown(),
|
||||
searchPagePath: Joi.alternatives()
|
||||
.try(Joi.boolean().invalid(true), Joi.string())
|
||||
.allow(null)
|
||||
.default(DEFAULT_CONFIG.searchPagePath),
|
||||
})
|
||||
.label('themeConfig.algolia')
|
||||
.required()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue