diff --git a/exampleSite/layouts/script/about-script.html b/exampleSite/layouts/script/about-script.html
deleted file mode 100644
index 0010344..0000000
--- a/exampleSite/layouts/script/about-script.html
+++ /dev/null
@@ -1,186 +0,0 @@
-{{ $jquery := resources.Get "js/jquery.min.js" | resources.Fingerprint }}
-
-{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
-
-{{ $zzo := resources.Get "js/zzo.js" | resources.Minify | resources.Fingerprint }}
-
-
-
\ No newline at end of file
diff --git a/exampleSite/layouts/script/archive-script.html b/exampleSite/layouts/script/archive-script.html
deleted file mode 100644
index 5d0dcbd..0000000
--- a/exampleSite/layouts/script/archive-script.html
+++ /dev/null
@@ -1,186 +0,0 @@
-{{ $jquery := resources.Get "js/jquery.min.js" | resources.Fingerprint }}
-
-{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
-
-{{ $zzo := resources.Get "js/zzo.js" | resources.Minify | resources.Fingerprint }}
-
-
-
\ No newline at end of file
diff --git a/exampleSite/layouts/script/gallery-script.html b/exampleSite/layouts/script/gallery-script.html
deleted file mode 100644
index d8cc833..0000000
--- a/exampleSite/layouts/script/gallery-script.html
+++ /dev/null
@@ -1,294 +0,0 @@
-{{ $jquery := resources.Get "js/jquery.min.js" | resources.Fingerprint }}
-
-{{ $masonry := resources.Get "js/masonry.pkgd.min.js" | resources.Fingerprint }}
-
-{{ $imagesloaded := resources.Get "js/imagesloaded.pkgd.min.js" | resources.Fingerprint }}
-
-{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
-
-{{ $zzo := resources.Get "js/zzo.js" | resources.Minify | resources.Fingerprint }}
-
-{{ $fancyboxjs := resources.Get "js/jquery.fancybox.min.js" | resources.Fingerprint }}
-
-{{ $fancyboxcss := resources.Get "css/jquery.fancybox.min.css" | resources.Fingerprint }}
-
-
-
\ No newline at end of file
diff --git a/exampleSite/layouts/script/home-script.html b/exampleSite/layouts/script/home-script.html
deleted file mode 100644
index 3ef9979..0000000
--- a/exampleSite/layouts/script/home-script.html
+++ /dev/null
@@ -1,188 +0,0 @@
-{{ $jquery := resources.Get "js/jquery.min.js" | resources.Fingerprint }}
-
-{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
-
-{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
-
-{{ $zzo := resources.Get "js/zzo.js" | resources.Minify | resources.Fingerprint }}
-
-
-
\ No newline at end of file
diff --git a/exampleSite/layouts/script/list-script.html b/exampleSite/layouts/script/list-script.html
deleted file mode 100644
index 3ef9979..0000000
--- a/exampleSite/layouts/script/list-script.html
+++ /dev/null
@@ -1,188 +0,0 @@
-{{ $jquery := resources.Get "js/jquery.min.js" | resources.Fingerprint }}
-
-{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
-
-{{ $lazysizes := resources.Get "js/lazysizes.min.js" | resources.Fingerprint }}
-
-{{ $zzo := resources.Get "js/zzo.js" | resources.Minify | resources.Fingerprint }}
-
-
-
\ No newline at end of file
diff --git a/exampleSite/layouts/script/single-script.html b/exampleSite/layouts/script/single-script.html
deleted file mode 100644
index b12635d..0000000
--- a/exampleSite/layouts/script/single-script.html
+++ /dev/null
@@ -1,581 +0,0 @@
-{{ $js := .Site.Data.lib.js }}
-{{ $css := .Site.Data.lib.css }}
-
-{{ $jquery := resources.Get "js/jquery.min.js" | resources.Fingerprint }}
-
-{{ $clipboard := resources.Get "js/clipboard.min.js" | resources.Fingerprint }}
-
-{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
-
-{{ $prism := resources.Get "js/prism.min.js" | resources.Minify | resources.Fingerprint }}
-
-{{ $zzo := resources.Get "js/zzo.js" | resources.Minify | resources.Fingerprint }}
-
-
-{{ if $.Param "enablePhotoSwipe" }}
- {{ $fancyboxjs := resources.Get "js/jquery.fancybox.min.js" | resources.Fingerprint }}
-
- {{ $fancyboxcss := resources.Get "css/jquery.fancybox.min.css" | resources.Fingerprint }}
-
-{{ end }}
-
-{{ if $.Param "enableToc" }}
- {{ $toc := resources.Get "js/jquery.toc.min.js" | resources.Fingerprint }}
-
-{{ end }}
-
-{{ if in .Params.Libraries "mermaid" }}
- {{ printf "" $js.mermaid.url $js.mermaid.sri | safeHTML }}
-{{ end }}
-
-{{ if in .Params.Libraries "katex" }}
- {{ printf "" $css.katex.url $css.katex.sri | safeHTML }}
- {{ printf "" $js.katex.url $js.katex.sri | safeHTML }}
- {{ printf "" $js.katex_auto_render.url $js.katex_auto_render.sri | safeHTML }}
-{{ end }}
-
-{{ if in .Params.Libraries "flowchartjs" }}
- {{ printf "" $js.raphael.url $js.raphael.sri | safeHTML }}
- {{ printf "" $js.flowchartjs.url $js.flowchartjs.sri | safeHTML }}
-{{ end }}
-
-{{ if in .Params.Libraries "mathjax" }}
- {{ printf "" $js.mathjax.url $js.mathjax.sri | safeHTML }}
-{{ end }}
-
-{{ if in .Params.Libraries "msc" }}
- {{ printf "" $js.webfont.url | safeHTML }}
- {{ printf "" $js.snap_svg.url | safeHTML }}
- {{ printf "" $js.lodash.url $js.lodash.sri | safeHTML }}
- {{ printf "" $js.sequence_diagram.url $js.sequence_diagram.sri | safeHTML }}
- {{ printf "" $css.sequence_diagram.url $css.sequence_diagram.sri | safeHTML }}
-{{ end }}
-
-{{ if in .Params.Libraries "chart" }}
- {{ printf "" $js.chart.url $js.chart.sri | safeHTML }}
-{{ end }}
-
-{{ if in .Params.Libraries "wavedrom" }}
- {{ printf "" $js.wavedrom.url $js.wavedrom.sri | safeHTML }}
- {{ printf "" $js.wavedrom_skin.url $js.wavedrom_skin.sri | safeHTML }}
-{{ end }}
-
-{{ if in .Params.Libraries "viz" }}
- {{ printf "" $js.viz.url | safeHTML }}
- {{ printf "" $js.viz_render.url $js.viz_render.sri | safeHTML }}
-{{ end }}
-
-
-
diff --git a/exampleSite/layouts/script/taxo-script.html b/exampleSite/layouts/script/taxo-script.html
deleted file mode 100644
index 5d0dcbd..0000000
--- a/exampleSite/layouts/script/taxo-script.html
+++ /dev/null
@@ -1,186 +0,0 @@
-{{ $jquery := resources.Get "js/jquery.min.js" | resources.Fingerprint }}
-
-{{ $enquire := resources.Get "js/enquire.min.js" | resources.Fingerprint }}
-
-{{ $zzo := resources.Get "js/zzo.js" | resources.Minify | resources.Fingerprint }}
-
-
-
\ No newline at end of file
diff --git a/layouts/partials/script/about-script.html b/layouts/partials/script/about-script.html
index d75fb25..181914f 100644
--- a/layouts/partials/script/about-script.html
+++ b/layouts/partials/script/about-script.html
@@ -10,7 +10,11 @@
// search
{{ $searchLanguages := .Site.Params.searchLanguages }}
var searchLanguages = JSON.parse({{ $searchLanguages | jsonify }});
- var baseurl = "{{ "/" | relLangURL }}";
+ {{ if .Site.IsMultiLingual }}
+ var baseurl = "{{.Site.BaseURL}}{{.Site.LanguagePrefix}}";
+ {{ else }}
+ var baseurl = "{{.Site.BaseURL}}";
+ {{ end }}
if (!searchLanguages) {
searchLanguages = ['en'];
@@ -29,7 +33,7 @@
if (!endsWith(baseurl, "/")) {
baseurl = baseurl + '/';
};
-
+
$.getJSON(baseurl + "index.json")
.done(function (index) {
pagesIndex = index;
diff --git a/layouts/partials/script/archive-script.html b/layouts/partials/script/archive-script.html
index d75fb25..7c17a31 100644
--- a/layouts/partials/script/archive-script.html
+++ b/layouts/partials/script/archive-script.html
@@ -10,7 +10,11 @@
// search
{{ $searchLanguages := .Site.Params.searchLanguages }}
var searchLanguages = JSON.parse({{ $searchLanguages | jsonify }});
- var baseurl = "{{ "/" | relLangURL }}";
+ {{ if .Site.IsMultiLingual }}
+ var baseurl = "{{.Site.BaseURL}}{{.Site.LanguagePrefix}}";
+ {{ else }}
+ var baseurl = "{{.Site.BaseURL}}";
+ {{ end }}
if (!searchLanguages) {
searchLanguages = ['en'];
diff --git a/layouts/partials/script/gallery-script.html b/layouts/partials/script/gallery-script.html
index de53575..5761ed6 100644
--- a/layouts/partials/script/gallery-script.html
+++ b/layouts/partials/script/gallery-script.html
@@ -118,7 +118,11 @@
// search
{{ $searchLanguages := .Site.Params.searchLanguages }}
var searchLanguages = JSON.parse({{ $searchLanguages | jsonify }});
- var baseurl = "{{ "/" | relLangURL }}";
+ {{ if .Site.IsMultiLingual }}
+ var baseurl = "{{.Site.BaseURL}}{{.Site.LanguagePrefix}}";
+ {{ else }}
+ var baseurl = "{{.Site.BaseURL}}";
+ {{ end }}
if (!searchLanguages) {
searchLanguages = ['en'];
diff --git a/layouts/partials/script/home-script.html b/layouts/partials/script/home-script.html
index b85bf7d..1560555 100644
--- a/layouts/partials/script/home-script.html
+++ b/layouts/partials/script/home-script.html
@@ -12,7 +12,11 @@
// search
{{ $searchLanguages := .Site.Params.searchLanguages }}
var searchLanguages = JSON.parse({{ $searchLanguages | jsonify }});
- var baseurl = "{{ "/" | relLangURL }}";
+ {{ if .Site.IsMultiLingual }}
+ var baseurl = "{{.Site.BaseURL}}{{.Site.LanguagePrefix}}";
+ {{ else }}
+ var baseurl = "{{.Site.BaseURL}}";
+ {{ end }}
if (!searchLanguages) {
searchLanguages = ['en'];
diff --git a/layouts/partials/script/list-script.html b/layouts/partials/script/list-script.html
index b85bf7d..1560555 100644
--- a/layouts/partials/script/list-script.html
+++ b/layouts/partials/script/list-script.html
@@ -12,7 +12,11 @@
// search
{{ $searchLanguages := .Site.Params.searchLanguages }}
var searchLanguages = JSON.parse({{ $searchLanguages | jsonify }});
- var baseurl = "{{ "/" | relLangURL }}";
+ {{ if .Site.IsMultiLingual }}
+ var baseurl = "{{.Site.BaseURL}}{{.Site.LanguagePrefix}}";
+ {{ else }}
+ var baseurl = "{{.Site.BaseURL}}";
+ {{ end }}
if (!searchLanguages) {
searchLanguages = ['en'];
diff --git a/layouts/partials/script/single-script.html b/layouts/partials/script/single-script.html
index e50c484..be4fc4e 100644
--- a/layouts/partials/script/single-script.html
+++ b/layouts/partials/script/single-script.html
@@ -84,7 +84,11 @@
// search
{{ $searchLanguages := .Site.Params.searchLanguages }}
var searchLanguages = JSON.parse({{ $searchLanguages | jsonify }});
- var baseurl = "{{ "/" | relLangURL }}";
+ {{ if .Site.IsMultiLingual }}
+ var baseurl = "{{.Site.BaseURL}}{{.Site.LanguagePrefix}}";
+ {{ else }}
+ var baseurl = "{{.Site.BaseURL}}";
+ {{ end }}
if (!searchLanguages) {
searchLanguages = ['en'];
diff --git a/layouts/partials/script/taxo-script.html b/layouts/partials/script/taxo-script.html
index d75fb25..7c17a31 100644
--- a/layouts/partials/script/taxo-script.html
+++ b/layouts/partials/script/taxo-script.html
@@ -10,7 +10,11 @@
// search
{{ $searchLanguages := .Site.Params.searchLanguages }}
var searchLanguages = JSON.parse({{ $searchLanguages | jsonify }});
- var baseurl = "{{ "/" | relLangURL }}";
+ {{ if .Site.IsMultiLingual }}
+ var baseurl = "{{.Site.BaseURL}}{{.Site.LanguagePrefix}}";
+ {{ else }}
+ var baseurl = "{{.Site.BaseURL}}";
+ {{ end }}
if (!searchLanguages) {
searchLanguages = ['en'];