From bb2717a3b911ba1a5912b1af5098c9b42e9b946c Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sun, 6 Dec 2020 19:44:36 +0530
Subject: [PATCH 1/5] search: fix redundant results after clearing searchbox
---
assets/js/fastsearch.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/assets/js/fastsearch.js b/assets/js/fastsearch.js
index 3261c155..357867b2 100644
--- a/assets/js/fastsearch.js
+++ b/assets/js/fastsearch.js
@@ -49,6 +49,8 @@ document.getElementById("searchInput").onkeyup = function (e) {
}
document.getElementById("searchResults").innerHTML = resultSet;
+ } else {
+ document.getElementById("searchResults").innerHTML = '';
}
}
From f4b900de72d28e14bca0e3cfa85866f838a7abe7 Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sun, 6 Dec 2020 19:45:46 +0530
Subject: [PATCH 2/5] footer: go-to-top: fix Uncrawlable Link rm redundant a
tag
---
layouts/partials/footer.html | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 5cd64a9f..65045f46 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -9,12 +9,10 @@
·
Theme PaperMod
-
-
-
+
{{- partial "extend_footer.html" . -}}
{{ if in site.Params.mainSections .Type }}
{{- if not .Site.Params.assets.disableFingerprinting }}
From 91bc0acfa9212a55299ecd7abf71a99df10d01c4 Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sun, 6 Dec 2020 22:31:18 +0530
Subject: [PATCH 3/5] Update README.md
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 0bb53b5f..c61e396d 100755
--- a/README.md
+++ b/README.md
@@ -48,6 +48,7 @@ Read this post For More Details => [hugo-PaperMod - Installation](https://aditya
- Light/Dark theme (automatic theme switch a/c to browser theme and theme-switch button).
- SEO Friendly.
- Muliple Author support.
+- Search Page
- No webpack, nodejs and other depedencies required to edit the theme :)
Read this post For More Details => [hugo-PaperMod - Features](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/)
From 08e58f5f773f935a97ecd0ce32acc62c2bc40ad4 Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Mon, 7 Dec 2020 22:59:51 +0530
Subject: [PATCH 4/5] head: commonize stylesheet resource
---
layouts/partials/head.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 055701f8..baaf732f 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -21,12 +21,12 @@
{{- end}}
+{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify -}}
{{- if not .Site.Params.assets.disableFingerprinting }}
-{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify | fingerprint -}}
+{{- $stylesheet := $stylesheet | fingerprint -}}
{{- else}}
-{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify -}}
{{- end}}
From db38e156f56ce452f29d248cae3efca6eb865774 Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Tue, 8 Dec 2020 00:16:11 +0530
Subject: [PATCH 5/5] footer: hljs: add check to not load hljs on archive and
search
---
layouts/partials/footer.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 65045f46..e6e894af 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -14,7 +14,7 @@
{{- partial "extend_footer.html" . -}}
-{{ if in site.Params.mainSections .Type }}
+{{ if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`)) }}
{{- if not .Site.Params.assets.disableFingerprinting }}
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }}