Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,10 @@ font:
math:
enable: false

# Default(false) will load mathjax/katex srcipt EVERY PAGE
# If you set to true, you need to add 'mathjax: true' in Front Matter of post
# in order to render math equations in post
per_page: false
# Default(true) will load mathjax/katex script on demand
# That is it only render those page who has 'mathjax: true' in Front Matter.
# If you set it to false, it will load mathjax/katex srcipt EVERY PAGE.
per_page: true

engine: mathjax
#engine: katex
Expand Down
18 changes: 9 additions & 9 deletions docs/MATH.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ If your content of config just directly after the config name, then a space is n
math:
enable: false

# Default(false) will load mathjax/katex srcipt EVERY PAGE
# If you set to true, you need to add 'mathjax: true' in Front Matter of post
# in order to render math equations in post
per_page: false
# Default(true) will load mathjax/katex script on demand
# That is it only render those page who has 'mathjax: true' in Front Matter.
# If you set it to false, it will load mathjax/katex srcipt EVERY PAGE.
per_page: true

engine: mathjax
#engine: katex
Expand Down Expand Up @@ -173,15 +173,13 @@ math:

### per_page

`true` or `false`, default is `false`.
`true` or `false`, default is `true`.

This option is to control whether to render Math Equations every page.

The behavior of default (`false`) is to render Math Equations on **every page**.

When you set it to `true`, it will only render the post with `mathjax: true` Front Matter.
The behavior of default (`true`) is to render Math Equations **on demand**.

If your post's Front Matter doesn't have `mathjax: true` or you set `mathjax: false`, then NexT will not render Math Equations for those posts.
It will only render those posts which have `mathjax: true` in their Front Matter.

For example:

Expand Down Expand Up @@ -211,6 +209,8 @@ title: 'Not Render Math Either'
....
```

When you set it to `false`, the math will be render on **EVERY PAGE**.

### cdn

Both MathJax and Katex provide a config `cdn`, if you don't know what is `cdn`, **do not touch it**.
Expand Down
17 changes: 8 additions & 9 deletions docs/zh-Hans/MATH.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ markdown:
math:
enable: false

# Default(false) will load mathjax/katex srcipt EVERY PAGE
# If you set to true, you need to add 'mathjax: true' in Front Matter of post
# in order to render math equations in post
per_page: false
# Default(true) will load mathjax/katex script on demand
# That is it only render those page who has 'mathjax: true' in Front Matter.
# If you set it to false, it will load mathjax/katex srcipt EVERY PAGE.
per_page: true

engine: mathjax
#engine: katex
Expand All @@ -164,7 +164,6 @@ math:
cdn: //cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css
# If you want to try the latest version of Katex, use one below instead
#cdn: //cdn.jsdelivr.net/katex/latest/katex.min.css

```

### enable
Expand All @@ -175,13 +174,11 @@ math:

### per_page

`true` 或者 `false`,默认为 `false`。
`true` 或者 `false`,默认为 `true`。

这个选项是控制是否在每篇文章都渲染数学公式;

默认(`false`)的行为是**对每篇文章都进行数学公式渲染**;

`true` 的行为是**只对 Front Matter 中含有 `mathjax: true` 的文章进行数学公式渲染**。
默认(`true`) 的行为是**只对 Front Matter 中含有 `mathjax: true` 的文章进行数学公式渲染**。

如果 Front Matter 中不含有 `mathjax: true`,或者 `mathjax: false`,那么 NexT 将不会对这些文章进行数学公式渲染。

Expand Down Expand Up @@ -213,6 +210,8 @@ title: 'Not Render Math Either'
....
```

当你将它设置为 `false` 时,它就会在每个页面都加载 MathJax 或者 Katex 来进行数学公式渲染。

### cdn

MathJax 和 Katex 都提供了 `cdn` 的配置,如果你不知道什么是 `cdn` ,**请不要修改这个配置**。
Expand Down