mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
feat(v2): add themeConfig validation to algolia theme (#3133)
* Algolia theme option validation * validateThemeConfig * remove useless runtime check
This commit is contained in:
parent
2159c4fcfb
commit
a1db6f7d75
5 changed files with 134 additions and 13 deletions
|
@ -10,10 +10,11 @@ const fs = require('fs');
|
|||
const eta = require('eta');
|
||||
const {normalizeUrl} = require('@docusaurus/utils');
|
||||
const openSearchTemplate = require('./templates/opensearch');
|
||||
const {validateThemeConfig} = require('./validateThemeConfig');
|
||||
|
||||
const OPEN_SEARCH_FILENAME = 'opensearch.xml';
|
||||
|
||||
module.exports = function (context) {
|
||||
function theme(context) {
|
||||
const {
|
||||
baseUrl,
|
||||
siteConfig: {title, url, favicon},
|
||||
|
@ -70,4 +71,8 @@ module.exports = function (context) {
|
|||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = theme;
|
||||
|
||||
theme.validateThemeConfig = validateThemeConfig;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue