exampleSite update
This commit is contained in:
parent
c56575712f
commit
79701f486b
|
@ -11,6 +11,7 @@
|
||||||
{{ $searchLanguages := .Site.Params.searchLanguages }}
|
{{ $searchLanguages := .Site.Params.searchLanguages }}
|
||||||
var searchLanguages = JSON.parse({{ $searchLanguages | jsonify }});
|
var searchLanguages = JSON.parse({{ $searchLanguages | jsonify }});
|
||||||
var baseurl = "{{ "/" | relLangURL }}";
|
var baseurl = "{{ "/" | relLangURL }}";
|
||||||
|
|
||||||
if (!searchLanguages) {
|
if (!searchLanguages) {
|
||||||
searchLanguages = ['en'];
|
searchLanguages = ['en'];
|
||||||
}
|
}
|
||||||
|
@ -23,16 +24,13 @@
|
||||||
function endsWith(str, suffix) {
|
function endsWith(str, suffix) {
|
||||||
return str.indexOf(suffix, str.length - suffix.length) !== -1;
|
return str.indexOf(suffix, str.length - suffix.length) !== -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function initLunr() {
|
function initLunr() {
|
||||||
if (!endsWith(baseurl, "/")) {
|
if (!endsWith(baseurl, "/")) {
|
||||||
baseurl = baseurl + '/';
|
baseurl = baseurl + '/';
|
||||||
}
|
};
|
||||||
if (baseurl.charAt(0) === '/') {
|
|
||||||
baseurl = baseurl.slice(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$.getJSON(baseurl + "index.json")
|
$.getJSON("/theme/hugo-theme-zzo" + baseurl + "index.json")
|
||||||
.done(function (index) {
|
.done(function (index) {
|
||||||
pagesIndex = index;
|
pagesIndex = index;
|
||||||
lunrIndex = lunr(function () {
|
lunrIndex = lunr(function () {
|
||||||
|
|
|
@ -29,11 +29,8 @@
|
||||||
if (!endsWith(baseurl, "/")) {
|
if (!endsWith(baseurl, "/")) {
|
||||||
baseurl = baseurl + '/';
|
baseurl = baseurl + '/';
|
||||||
};
|
};
|
||||||
if (baseurl.charAt(0) === '/') {
|
|
||||||
baseurl = baseurl.slice(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$.getJSON(baseurl + "index.json")
|
$.getJSON("/theme/hugo-theme-zzo" + baseurl + "index.json")
|
||||||
.done(function (index) {
|
.done(function (index) {
|
||||||
pagesIndex = index;
|
pagesIndex = index;
|
||||||
lunrIndex = lunr(function () {
|
lunrIndex = lunr(function () {
|
||||||
|
|
|
@ -137,11 +137,8 @@
|
||||||
if (!endsWith(baseurl, "/")) {
|
if (!endsWith(baseurl, "/")) {
|
||||||
baseurl = baseurl + '/';
|
baseurl = baseurl + '/';
|
||||||
};
|
};
|
||||||
if (baseurl.charAt(0) === '/') {
|
|
||||||
baseurl = baseurl.slice(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$.getJSON(baseurl + "index.json")
|
$.getJSON("/theme/hugo-theme-zzo" + baseurl + "index.json")
|
||||||
.done(function (index) {
|
.done(function (index) {
|
||||||
pagesIndex = index;
|
pagesIndex = index;
|
||||||
lunrIndex = lunr(function () {
|
lunrIndex = lunr(function () {
|
||||||
|
|
|
@ -31,11 +31,8 @@
|
||||||
if (!endsWith(baseurl, "/")) {
|
if (!endsWith(baseurl, "/")) {
|
||||||
baseurl = baseurl + '/';
|
baseurl = baseurl + '/';
|
||||||
};
|
};
|
||||||
if (baseurl.charAt(0) === '/') {
|
|
||||||
baseurl = baseurl.slice(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$.getJSON(baseurl + "index.json")
|
$.getJSON("/theme/hugo-theme-zzo" + baseurl + "index.json")
|
||||||
.done(function (index) {
|
.done(function (index) {
|
||||||
pagesIndex = index;
|
pagesIndex = index;
|
||||||
lunrIndex = lunr(function () {
|
lunrIndex = lunr(function () {
|
||||||
|
|
|
@ -31,11 +31,8 @@
|
||||||
if (!endsWith(baseurl, "/")) {
|
if (!endsWith(baseurl, "/")) {
|
||||||
baseurl = baseurl + '/';
|
baseurl = baseurl + '/';
|
||||||
};
|
};
|
||||||
if (baseurl.charAt(0) === '/') {
|
|
||||||
baseurl = baseurl.slice(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$.getJSON(baseurl + "index.json")
|
$.getJSON("/theme/hugo-theme-zzo" + baseurl + "index.json")
|
||||||
.done(function (index) {
|
.done(function (index) {
|
||||||
pagesIndex = index;
|
pagesIndex = index;
|
||||||
lunrIndex = lunr(function () {
|
lunrIndex = lunr(function () {
|
||||||
|
|
|
@ -103,11 +103,8 @@
|
||||||
if (!endsWith(baseurl, "/")) {
|
if (!endsWith(baseurl, "/")) {
|
||||||
baseurl = baseurl + '/';
|
baseurl = baseurl + '/';
|
||||||
};
|
};
|
||||||
if (baseurl.charAt(0) === '/') {
|
|
||||||
baseurl = baseurl.slice(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$.getJSON(baseurl + "index.json")
|
$.getJSON("/theme/hugo-theme-zzo" + baseurl + "index.json")
|
||||||
.done(function (index) {
|
.done(function (index) {
|
||||||
pagesIndex = index;
|
pagesIndex = index;
|
||||||
lunrIndex = lunr(function () {
|
lunrIndex = lunr(function () {
|
||||||
|
|
|
@ -29,11 +29,8 @@
|
||||||
if (!endsWith(baseurl, "/")) {
|
if (!endsWith(baseurl, "/")) {
|
||||||
baseurl = baseurl + '/';
|
baseurl = baseurl + '/';
|
||||||
};
|
};
|
||||||
if (baseurl.charAt(0) === '/') {
|
|
||||||
baseurl = baseurl.slice(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$.getJSON(baseurl + "index.json")
|
$.getJSON("/theme/hugo-theme-zzo" + baseurl + "index.json")
|
||||||
.done(function (index) {
|
.done(function (index) {
|
||||||
pagesIndex = index;
|
pagesIndex = index;
|
||||||
lunrIndex = lunr(function () {
|
lunrIndex = lunr(function () {
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
"theme_color": "#FF6188",
|
"theme_color": "#FF6188",
|
||||||
"background_color": "#2D2A2E",
|
"background_color": "#2D2A2E",
|
||||||
"icons": [{
|
"icons": [{
|
||||||
"src": "logo-192.png",
|
"src": "{{ "logo-192.png" | relURL }}",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}, {
|
}, {
|
||||||
"src": "logo-512.png",
|
"src": "{{ "logo-512.png" | relURL }}",
|
||||||
"sizes": "512x512",
|
"sizes": "512x512",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}],
|
}],
|
||||||
|
|
Loading…
Reference in New Issue