Replies: 1 comment
-
|
I suspect you're missing If it's missing, you need to change line 72 of FROM: TO: notes the S at the end of archiveS. Easy to overlook. search.js is not the actual filename, but is generated and contains lots of numbers etc. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i tried combining their html files in an override of my-site/layout/_default/archive .. but i'm unable to get search to work (no results when typing)
{{- define "main" }} <header class="page-header"> <h1>{{- (printf "%s " .Title ) | htmlUnescape -}} <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="11" cy="11" r="8"></circle> <line x1="21" y1="21" x2="16.65" y2="16.65"></line> </svg> </h1> {{- if .Description }} <div class="post-description"> {{ .Description }} </div> {{- end }} {{- if not (.Param "hideMeta") }} <div class="post-meta"> {{- partial "translation_list.html" . -}} </div> {{- end }} </header> <div id="searchbox"> <input id="searchInput" autofocus placeholder="{{ .Params.placeholder | default (printf "%s ↵" .Title) }}" aria-label="search" type="search"> <ul id="searchResults" aria-label="search results"></ul> </div> {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{- if .Site.Params.ShowAllPagesInArchive }} {{- $pages = site.RegularPages }} {{- end }} {{- range $pages.GroupByPublishDate "2006" }} {{- if ne .Key "0001" }} <div class="archive-year"> <h2 class="archive-year-header"> {{- replace .Key "0001" "" }}<sup class="archive-count"> {{ len .Pages }}</sup> </h2> {{- range .Pages.GroupByDate "January" }} <div class="archive-month"> <h3 class="archive-month-header">{{- .Key }}<sup class="archive-count"> {{ len .Pages }}</sup></h3> <div class="archive-posts"> {{- range .Pages }} {{- if eq .Kind "page" }} <div class="archive-entry"> <h3 class="archive-entry-title"> {{- .Title | markdownify }} {{- if .Draft }}<sup><span class="entry-isdraft"> [draft]</span></sup>{{- end }} </h3> <div class="archive-meta"> {{- partial "post_meta.html" . -}} </div> <a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a> </div> {{- end }} {{- end }} </div> </div> {{- end }} </div> {{- end }} {{- end }} {{- end }}{{/* end main */}}Beta Was this translation helpful? Give feedback.
All reactions