exampleSite update

This commit is contained in:
zzossig 2019-11-25 01:05:01 +09:00
parent c56575712f
commit 79701f486b
8 changed files with 12 additions and 32 deletions

View File

@ -11,6 +11,7 @@
{{ $searchLanguages := .Site.Params.searchLanguages }}
var searchLanguages = JSON.parse({{ $searchLanguages | jsonify }});
var baseurl = "{{ "/" | relLangURL }}";
if (!searchLanguages) {
searchLanguages = ['en'];
}
@ -23,16 +24,13 @@
function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
function initLunr() {
if (!endsWith(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) {
pagesIndex = index;
lunrIndex = lunr(function () {

View File

@ -29,11 +29,8 @@
if (!endsWith(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) {
pagesIndex = index;
lunrIndex = lunr(function () {

View File

@ -137,11 +137,8 @@
if (!endsWith(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) {
pagesIndex = index;
lunrIndex = lunr(function () {

View File

@ -31,11 +31,8 @@
if (!endsWith(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) {
pagesIndex = index;
lunrIndex = lunr(function () {

View File

@ -31,11 +31,8 @@
if (!endsWith(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) {
pagesIndex = index;
lunrIndex = lunr(function () {

View File

@ -103,11 +103,8 @@
if (!endsWith(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) {
pagesIndex = index;
lunrIndex = lunr(function () {

View File

@ -29,11 +29,8 @@
if (!endsWith(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) {
pagesIndex = index;
lunrIndex = lunr(function () {

View File

@ -5,11 +5,11 @@
"theme_color": "#FF6188",
"background_color": "#2D2A2E",
"icons": [{
"src": "logo-192.png",
"src": "{{ "logo-192.png" | relURL }}",
"sizes": "192x192",
"type": "image/png"
}, {
"src": "logo-512.png",
"src": "{{ "logo-512.png" | relURL }}",
"sizes": "512x512",
"type": "image/png"
}],