Skip to content

Commit 7aee05c

Browse files
authored
Remove JS and other files from search index (#4000)
To avoid getting JS and irrelevant files indexed remove pages where title is null. This gives a much cleaner Lunr store with more relevant content.
1 parent 08b0303 commit 7aee05c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/js/lunr/lunr-store.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var store = [
4747
}{%- unless forloop.last and l -%},{%- endunless -%}
4848
{%- endfor -%}
4949
{%- endfor -%}{%- if site.lunr.search_within_pages -%},
50-
{%- assign pages = site.pages | where_exp:'doc','doc.search != false' -%}
50+
{%- assign pages = site.pages | where_exp:'doc','doc.search != false and doc.title != null' -%}
5151
{%- for doc in pages -%}
5252
{%- if forloop.last -%}
5353
{%- assign l = true -%}

0 commit comments

Comments
 (0)