Exclude main.scss from Lunr search index

This commit is contained in:
Michael Rose 2022-05-27 11:48:46 -04:00
parent bcb15f80e7
commit 55f6e8fae5
5 changed files with 7 additions and 1 deletions

View file

@ -16,6 +16,7 @@
### Enhancements ### Enhancements
- Exclude `main.scss` from Lunr search index.
- Allow `site.pages` to be indexed and searched via Lunr. [#3352](https://github.com/mmistakes/minimal-mistakes/pull/3352) - Allow `site.pages` to be indexed and searched via Lunr. [#3352](https://github.com/mmistakes/minimal-mistakes/pull/3352)
- Update jQuery to v3.6.0. [#3254](https://github.com/mmistakes/minimal-mistakes/pull/3254) - Update jQuery to v3.6.0. [#3254](https://github.com/mmistakes/minimal-mistakes/pull/3254)
- Use notice `<a>` colors for blockquotes that have `notice--` classes applied. [#3140](https://github.com/mmistakes/minimal-mistakes/pull/3140) [#3068](https://github.com/mmistakes/minimal-mistakes/issues/3068) - Use notice `<a>` colors for blockquotes that have `notice--` classes applied. [#3140](https://github.com/mmistakes/minimal-mistakes/pull/3140) [#3068](https://github.com/mmistakes/minimal-mistakes/issues/3068)

View file

@ -1,5 +1,6 @@
--- ---
# Only the main Sass file needs front matter (the dashes are enough) # Only the main Sass file needs front matter (the dashes are enough)
search: false
--- ---
@charset "utf-8"; @charset "utf-8";

View file

@ -47,7 +47,8 @@ var store = [
}{%- unless forloop.last and l -%},{%- endunless -%} }{%- unless forloop.last and l -%},{%- endunless -%}
{%- endfor -%} {%- endfor -%}
{%- endfor -%}{%- if site.lunr.search_within_pages -%}, {%- endfor -%}{%- if site.lunr.search_within_pages -%},
{%- for doc in site.pages -%} {%- assign pages = site.pages | where_exp:'doc','doc.search != false' -%}
{%- for doc in pages -%}
{%- if forloop.last -%} {%- if forloop.last -%}
{%- assign l = true -%} {%- assign l = true -%}
{%- endif -%} {%- endif -%}

View file

@ -27,6 +27,7 @@ toc: false
### Enhancements ### Enhancements
- Exclude `main.scss` from Lunr search index.
- Allow `site.pages` to be indexed and searched via Lunr. [#3352](https://github.com/mmistakes/minimal-mistakes/pull/3352) - Allow `site.pages` to be indexed and searched via Lunr. [#3352](https://github.com/mmistakes/minimal-mistakes/pull/3352)
- Update jQuery to v3.6.0. [#3254](https://github.com/mmistakes/minimal-mistakes/pull/3254) - Update jQuery to v3.6.0. [#3254](https://github.com/mmistakes/minimal-mistakes/pull/3254)
- Use notice `<a>` colors for blockquotes that have `notice--` classes applied. [#3140](https://github.com/mmistakes/minimal-mistakes/pull/3140) [#3068](https://github.com/mmistakes/minimal-mistakes/issues/3068) - Use notice `<a>` colors for blockquotes that have `notice--` classes applied. [#3140](https://github.com/mmistakes/minimal-mistakes/pull/3140) [#3068](https://github.com/mmistakes/minimal-mistakes/issues/3068)

View file

@ -52,6 +52,8 @@ atom_feed:
search : true # true, false (default) search : true # true, false (default)
search_full_content : true # true, false (default) search_full_content : true # true, false (default)
search_provider : "lunr" search_provider : "lunr"
lunr:
search_within_pages : true
algolia: algolia:
application_id : "QB6HVGBSBA" application_id : "QB6HVGBSBA"
index_name : "dev_minimal-mistakes" index_name : "dev_minimal-mistakes"