Skip to content

Commit

Permalink
Fix where_exp for Jekyll < 4.0
Browse files Browse the repository at this point in the history
'and' and 'or' are new in Jekyll 4.0.
Ref: https://stackoverflow.com/posts/comments/111965719
  • Loading branch information
iBug committed Apr 27, 2024
1 parent 7d61488 commit 7ea8510
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- "You may also enjoy" no longer recommends hidden posts. [#4653](https://github.com/mmistakes/minimal-mistakes/issues/4653)
- Replaced dead link to "Viewport and Media Queries" slides. [#4421](https://github.com/mmistakes/minimal-mistakes/discussions/4421)
- Fix broken `where_exp` in `lunr-store.js` for Jekyll &lt; 4.0. [#4808](https://github.com/mmistakes/minimal-mistakes/issues/4808)

### Enhancements

Expand Down
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 and doc.title != null' -%}
{%- assign pages = site.pages | where_exp: 'doc', 'doc.search != false' | where_exp: 'doc', 'doc.title != null' -%}
{%- for doc in pages -%}
{%- if forloop.last -%}
{%- assign l = true -%}
Expand Down
3 changes: 2 additions & 1 deletion docs/_docs/18-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ permalink: "/docs/history/"
excerpt: Change log of enhancements and bug fixes made to the theme.
sidebar:
nav: docs
last_modified_at: '2024-04-28T00:38:38+08:00'
last_modified_at: '2024-04-28T00:56:01+08:00'
toc: false
---

Expand All @@ -21,6 +21,7 @@ toc: false

- "You may also enjoy" no longer recommends hidden posts. [#4653](https://github.com/mmistakes/minimal-mistakes/issues/4653)
- Replaced dead link to "Viewport and Media Queries" slides. [#4421](https://github.com/mmistakes/minimal-mistakes/discussions/4421)
- Fix broken `where_exp` in `lunr-store.js` for Jekyll &lt; 4.0. [#4808](https://github.com/mmistakes/minimal-mistakes/issues/4808)

### Enhancements

Expand Down

0 comments on commit 7ea8510

Please sign in to comment.