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.
This commit is contained in:
parent
08b0303298
commit
7aee05ce0c
2
assets/js/lunr/lunr-store.js
vendored
2
assets/js/lunr/lunr-store.js
vendored
@ -47,7 +47,7 @@ var store = [
|
||||
}{%- unless forloop.last and l -%},{%- endunless -%}
|
||||
{%- endfor -%}
|
||||
{%- endfor -%}{%- if site.lunr.search_within_pages -%},
|
||||
{%- assign pages = site.pages | where_exp:'doc','doc.search != false' -%}
|
||||
{%- assign pages = site.pages | where_exp:'doc','doc.search != false and doc.title != null' -%}
|
||||
{%- for doc in pages -%}
|
||||
{%- if forloop.last -%}
|
||||
{%- assign l = true -%}
|
||||
|
Loading…
x
Reference in New Issue
Block a user