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

github.com/Lednerb/bilberry-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Brendel <mail@lednerb.eu>2020-08-14 21:07:33 +0300
committerSascha Brendel <mail@lednerb.eu>2020-08-14 21:07:33 +0300
commit9418144615fbe6bf4f3de3c7dbeeac8aa6c8a686 (patch)
tree3de5330da4357490150fdef1be6bcb55a8909cf8
parent53322368609bc3f37e69c0b52c4d6ee73a406d08 (diff)
Fixed issue with missing custom icon in search index.
-rw-r--r--layouts/index.json8
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/index.json b/layouts/index.json
index 5f28969..863ccb3 100644
--- a/layouts/index.json
+++ b/layouts/index.json
@@ -13,8 +13,10 @@
{{- end -}}
{{- range where .Site.RegularPages "Type" "not in" (slice "page" "json") -}}
- {{- $iconClass := "fa-pencil-alt" -}}
- {{- if eq .Type "quote" -}}
+ {{- $iconClass := "" -}}
+ {{- if and (isset .Params "icon") (ne .Params.icon "") -}}
+ {{- $iconClass = .Params.icon -}}
+ {{- else if eq .Type "quote" -}}
{{- $iconClass = "fa-quote-right" -}}
{{- else if eq .Type "link" -}}
{{- $iconClass = "fa-link" -}}
@@ -26,6 +28,8 @@
{{- $iconClass = "fa-music" -}}
{{- else if eq .Type "code" -}}
{{- $iconClass = "fa-code" -}}
+ {{- else -}}
+ {{- $iconClass = "fa-pencil-alt" -}}
{{- end -}}
{{- range .Translations -}}