mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Rename per_page to every_page
This commit is contained in:
parent
5e1b0d0e8c
commit
a3dcac5f33
@ -495,10 +495,10 @@ baidu_push: false
|
|||||||
# See: https://theme-next.js.org/docs/third-party-services/math-equations
|
# See: https://theme-next.js.org/docs/third-party-services/math-equations
|
||||||
# Server-side plugin: https://github.com/next-theme/hexo-filter-mathjax
|
# Server-side plugin: https://github.com/next-theme/hexo-filter-mathjax
|
||||||
math:
|
math:
|
||||||
# Default (true) will load mathjax / katex script on demand.
|
# Default (false) will load mathjax / katex script on demand.
|
||||||
# That is it only render those page which has `mathjax: true` in Front-matter.
|
# That is it only render those page which has `mathjax: true` in Front-matter.
|
||||||
# If you set it to false, it will load mathjax / katex srcipt EVERY PAGE.
|
# If you set it to true, it will load mathjax / katex srcipt EVERY PAGE.
|
||||||
per_page: true
|
every_page: false
|
||||||
|
|
||||||
mathjax:
|
mathjax:
|
||||||
enable: false
|
enable: false
|
||||||
|
|||||||
4
layout/_third-party/math/index.njk
vendored
4
layout/_third-party/math/index.njk
vendored
@ -2,7 +2,7 @@
|
|||||||
{%- set is_index_has_math = false %}
|
{%- set is_index_has_math = false %}
|
||||||
|
|
||||||
{# At home, check if there has `mathjax: true` post #}
|
{# At home, check if there has `mathjax: true` post #}
|
||||||
{%- if is_home() and theme.math.per_page %}
|
{%- if is_home() and not theme.math.every_page %}
|
||||||
{%- for post in page.posts.toArray() %}
|
{%- for post in page.posts.toArray() %}
|
||||||
{%- if post.mathjax and not is_index_has_math %}
|
{%- if post.mathjax and not is_index_has_math %}
|
||||||
{%- set is_index_has_math = true %}
|
{%- set is_index_has_math = true %}
|
||||||
@ -10,7 +10,7 @@
|
|||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{%- if not theme.math.per_page or is_index_has_math or page.mathjax %}
|
{%- if theme.math.every_page or is_index_has_math or page.mathjax %}
|
||||||
{%- if theme.math.mathjax.enable %}
|
{%- if theme.math.mathjax.enable %}
|
||||||
{% include '_third-party/math/mathjax.njk' %}
|
{% include '_third-party/math/mathjax.njk' %}
|
||||||
{% elif theme.math.katex.enable %}
|
{% elif theme.math.katex.enable %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user