runtimeterror/layouts/partials/search-index.html

16 lines
522 B
HTML
Raw Normal View History

2024-01-15 22:02:30 +00:00
<script>
window.store = {
{{ range where .Site.Pages "Section" "posts" }}
"{{ .Permalink }}": {
"title": "{{ .Title }}",
"tags": [{{ range .Params.Tags }}"{{ . }}",{{ end }}],
"content": {{ .Content | plainify }},
"url": "{{ .Permalink }}"
},
{{ end }}
}
</script>
{{ $jsLunr := resources.Get "js/lunr.js" | minify }}
<script src="{{ $jsLunr.RelPermalink }}"></script>
{{ $jsSearch := resources.Get "js/search.js" | minify }}
<script src="{{ $jsSearch.RelPermalink }}"></script>