Skip to content

Commit

Permalink
Remove JS and other files from search index (mmistakes#4000)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
LasseAhhMann authored and minyoongi96 committed Aug 26, 2024
1 parent 102c771 commit ce9ae2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/lunr/lunr-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%}
Expand Down

0 comments on commit ce9ae2e

Please sign in to comment.