docs: hide search input temporarily

This commit is contained in:
chenjiahan 2020-12-10 20:16:56 +08:00
parent 7cce09384f
commit 0517c51cc9

View File

@ -39,25 +39,26 @@ module.exports = {
url: 'https://github.com/youzan/vant', url: 'https://github.com/youzan/vant',
}, },
], ],
searchConfig: { // TODO
apiKey: '90067aecdaa2c85220e2783cd305caac', // searchConfig: {
indexName: 'vant', // apiKey: '90067aecdaa2c85220e2783cd305caac',
searchParameters: { // indexName: 'vant',
facetFilters: ['lang:zh-CN', 'version:3.x'], // searchParameters: {
}, // facetFilters: ['lang:zh-CN', 'version:3.x'],
transformItems(items) { // },
if (location.hostname !== 'youzan.github.io') { // transformItems(items) {
items.forEach((item) => { // if (location.hostname !== 'youzan.github.io') {
if (item.url) { // items.forEach((item) => {
item.url = // if (item.url) {
item.url && // item.url =
item.url.replace('youzan.github.io', location.hostname); // item.url &&
} // item.url.replace('youzan.github.io', location.hostname);
}); // }
} // });
return items; // }
}, // return items;
}, // },
// },
nav: [ nav: [
{ {
title: '开发指南', title: '开发指南',
@ -415,13 +416,14 @@ module.exports = {
url: 'https://github.com/youzan/vant', url: 'https://github.com/youzan/vant',
}, },
], ],
searchConfig: { // TODO
apiKey: '90067aecdaa2c85220e2783cd305caac', // searchConfig: {
indexName: 'vant', // apiKey: '90067aecdaa2c85220e2783cd305caac',
searchParameters: { // indexName: 'vant',
facetFilters: ['lang:en-US', 'version:3.x'], // searchParameters: {
}, // facetFilters: ['lang:en-US', 'version:3.x'],
}, // },
// },
nav: [ nav: [
{ {
title: 'Essentials', title: 'Essentials',