Skip to content

Commit 69ecbd2

Browse files
mmistakessehyeon1104
authored andcommittedJan 9, 2023
Exclude main.scss from Lunr search index
1 parent f32806e commit 69ecbd2

File tree

5 files changed

+7
-1
lines changed

5 files changed

+7
-1
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
### Enhancements
1818

19+
- Exclude `main.scss` from Lunr search index.
1920
- Allow `site.pages` to be indexed and searched via Lunr. [#3352](https://github.com/mmistakes/minimal-mistakes/pull/3352)
2021
- Update jQuery to v3.6.0. [#3254](https://github.com/mmistakes/minimal-mistakes/pull/3254)
2122
- 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)

‎assets/css/main.scss

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
# Only the main Sass file needs front matter (the dashes are enough)
3+
search: false
34
---
45

56
@charset "utf-8";

‎assets/js/lunr/lunr-store.js

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

‎docs/_docs/18-history.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ toc: false
2727

2828
### Enhancements
2929

30+
- Exclude `main.scss` from Lunr search index.
3031
- Allow `site.pages` to be indexed and searched via Lunr. [#3352](https://github.com/mmistakes/minimal-mistakes/pull/3352)
3132
- Update jQuery to v3.6.0. [#3254](https://github.com/mmistakes/minimal-mistakes/pull/3254)
3233
- 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)

‎test/_config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ atom_feed:
5252
search : true # true, false (default)
5353
search_full_content : true # true, false (default)
5454
search_provider : "lunr"
55+
lunr:
56+
search_within_pages : true
5557
algolia:
5658
application_id : "QB6HVGBSBA"
5759
index_name : "dev_minimal-mistakes"

0 commit comments

Comments
 (0)
Please sign in to comment.