Fix where_exp for Jekyll < 4.0

'and' and 'or' are new in Jekyll 4.0.
Ref: https://stackoverflow.com/posts/comments/111965719
This commit is contained in:
iBug
2024-04-28 00:56:17 +08:00
parent 7d61488f5e
commit 7ea8510d4f
3 changed files with 4 additions and 2 deletions

View File

@ -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 -%}