Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix https://github.com/nunocoracao/blowfish/issues/1563 #1582

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function executeQuery(term) {
<div class="-mb-1 text-lg font-bold">
${title}
</div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">${value.item.section}<span class="px-2 text-primary-500">&middot;</span>${value.item.date}</span></div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">${value.item.section}<span class="px-2 text-primary-500">&middot;</span>${value.item.date? value.item.date : ""}</span></div>
<div class="text-sm italic">${value.item.summary}</div>
</div>
<div class="ml-2 ltr:block rtl:hidden text-neutral-500">&rarr;</div>
Expand Down
16 changes: 14 additions & 2 deletions layouts/_default/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
{{ end }}
{{- range $pages -}}
{{- $section := .Site.GetPage "section" .Section -}}
{{- $index = $index | append (dict
{{- if .Date -}}
{{- $index = $index | append (dict
"date" (.Date | time.Format (.Site.Language.Params.dateFormat | default ":date_long"))
"title" (.Title | emojify | safeJS)
"section" ($section.Title | emojify | safeJS)
Expand All @@ -14,6 +15,17 @@
"permalink" .RelPermalink
"externalUrl" .Params.externalUrl
"type" .Type
) -}}
) -}}
{{- else -}}
{{- $index = $index | append (dict
"title" (.Title | emojify | safeJS)
"section" ($section.Title | emojify | safeJS)
"summary" (.Summary | safeJS)
"content" (.Plain | safeJS)
"permalink" .RelPermalink
"externalUrl" .Params.externalUrl
"type" .Type
) -}}
{{- end -}}
{{- end -}}
{{- $index | jsonify -}}