Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zzossig/hugo-theme-zzo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzzossig <zzossig@gmail.com>2020-10-25 19:02:28 +0300
committerzzossig <zzossig@gmail.com>2020-10-25 19:02:28 +0300
commited920bdd6d7bd0e5e45e7a2f9f32db3452c0a06c (patch)
treee08ea1ed69bf8f84ba1f58ca76ab98014f54f11e /layouts
parent5acd0525b6b3263cfe3931c43355a9023f40a54f (diff)
search bug fix
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/partials/head/scripts.html12
2 files changed, 7 insertions, 7 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 2739e5c..ae3c6c9 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -7,7 +7,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ block "title" . }}{{ .Title }} – {{ .Site.Title }}{{ end }}</title>
{{ partial "head/scripts" . }}
- {{ partialCached "head/styles" . }}
+ {{ partial "head/styles" . }}
{{ partial "head/meta" . }}
{{ partial "head/meta_json_ld" . }}
{{ partial "head/services" . }}
diff --git a/layouts/partials/head/scripts.html b/layouts/partials/head/scripts.html
index 1ccf8b6..abd1484 100644
--- a/layouts/partials/head/scripts.html
+++ b/layouts/partials/head/scripts.html
@@ -620,16 +620,16 @@
li.className = 'search-result__item';
var a = document.createElement('a');
- a.innerHTML = obj.title;
+ a.innerHTML = obj.item.title;
a.setAttribute('class', 'search-result__item--title');
- a.setAttribute('href', obj.permalink);
+ a.setAttribute('href', obj.item.permalink);
var descDiv = document.createElement('div');
descDiv.setAttribute('class', 'search-result__item--desc');
- if (obj.description) {
- descDiv.innerHTML = obj.description;
- } else if (obj.content) {
- descDiv.innerHTML = obj.content.substring(0, 225);
+ if (obj.item.description) {
+ descDiv.innerHTML = obj.item.description;
+ } else if (obj.item.content) {
+ descDiv.innerHTML = obj.item.content.substring(0, 225);
}
li.appendChild(a);