mirror of https://github.com/IoTcat/sola.git
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.
48 lines
1.2 KiB
48 lines
1.2 KiB
5 years ago
|
const langs = [
|
||
|
{ title: '简体中文', path: '/home', matchPath: /^\/(home|ecosystem|support)/ },
|
||
|
];
|
||
|
|
||
|
docute.init({
|
||
|
landing: 'landing.html',
|
||
|
title: 'Sola Proj',
|
||
|
repo: 'iotcat/sola',
|
||
|
twitter: 'iotcat',
|
||
|
'edit-link': 'https://github.com/IoTcat/sola/blob/master/docs/',
|
||
|
nav: {
|
||
|
default: [
|
||
|
{
|
||
|
title: '首页', path: '/en/'
|
||
|
}
|
||
|
],
|
||
|
},
|
||
|
plugins: [
|
||
|
docsearch({
|
||
|
apiKey: '46a8ba306e368972c1d75feb581fb430',
|
||
|
indexName: 'wiot',
|
||
|
tags: ['english', 'zh-Hans'],
|
||
|
url: 'http://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);
|
||
|
}
|