You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

72 lines
1.9 KiB

const langs = [
{ title: '简体中文', path: '/home', matchPath: /^\/(home|ecosystem|support)/ },
{ title: 'English', path: '/en/', matchPath: /^\/en/ },
];
docute.init({
landing: 'landing.html',
title: 'wIoT',
repo: 'iotcat/wIoT',
twitter: 'iotcat',
'edit-link': 'https://github.com/IoTcat/wIoT/blob/master/docs/',
nav: {
default: [
{
title: 'Home', path: '/home'
},
{
title: 'Ecosystem', path: '/ecosystem'
},
{
title: 'Support wIoT', path: '/support'
},
{
title: 'Languages', type: 'dropdown', items: langs
}
],
'zh-Hans': [
{
title: '首页', path: '/en/'
},
{
title: '生态', path: '/en/ecosystem'
},
{
title: '支持 wIoT', path: '/en/support'
},
{
title: '选择语言', type: 'dropdown', items: langs
}
],
},
plugins: [
docsearch({
apiKey: '4de49b1faa7fecd36ac7a295fcb55229',
indexName: 'wiot',
inputSelector: '.search-box',
tags: ['english', 'zh-Hans'],
url: 'https://wiot.eee.dog/'
}),
evanyou()
]
});
function loadScript (src, callback) {
let s,
r,
t;
r = false;
s = document.createElement('script');
s.type = 'text/javascript';
s.src = src;
s.onload = s.onreadystatechange = function () {
// console.log( this.readyState ); //uncomment this line to see which ready states are called.
if (!r && (!this.readyState || this.readyState == 'complete'))
{
r = true;
callback();
}
};
t = document.getElementsByTagName('script')[0];
t.parentNode.insertBefore(s, t);
}