mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2025-05-31 12:53:12 +00:00
#179, Also include sections to search
This commit is contained in:
parent
5ba88ccad5
commit
6e5d35a5ab
@ -16,7 +16,7 @@
|
|||||||
const index = FlexSearch.create('balance', indexCfg);
|
const index = FlexSearch.create('balance', indexCfg);
|
||||||
window.bookSearchIndex = index;
|
window.bookSearchIndex = index;
|
||||||
|
|
||||||
{{ range $index, $page := .Site.RegularPages }}
|
{{ range $index, $page := where .Site.Pages "Kind" "in" (slice "page" "section") }}
|
||||||
index.add({
|
index.add({
|
||||||
'id': {{ $index }},
|
'id': {{ $index }},
|
||||||
'href': '{{ $page.RelPermalink }}',
|
'href': '{{ $page.RelPermalink }}',
|
||||||
|
Loading…
Reference in New Issue
Block a user