1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

feat(deps): move MathJax configuration to a separate file (#1670)

Move `MathJax` configuration to file `assets/js/data/mathjax.js` will help add extensions.
This commit is contained in:
Cotes Chung
2024-04-14 04:34:32 +08:00
committed by GitHub
parent 7d48d32c7b
commit 44f552cbce
3 changed files with 35 additions and 20 deletions

View File

@@ -109,7 +109,9 @@ comments: false
## Mathematics
For website performance reasons, the mathematical feature won't be loaded by default. But it can be enabled by:
We use [**MathJax**][mathjax] to generate mathematics. For website performance reasons, the mathematical feature won't be loaded by default. But it can be enabled by:
[mathjax]: https://www.mathjax.org/
```yaml
---
@@ -154,6 +156,12 @@ Can be referenced as \eqref{eq:label_name}.
3. \$$ LaTeX_math_expression $$
```
> Starting with `v7.0.0`, configuration options for **MathJax** have been moved to file `assets/js/data/mathjax.js`{: .filepath }, and you can change the options as needed, such as adding [extensions][mathjax-exts].
> If you are building the site via `chirpy-starter`, copy that file from the gem installation directory (check with command `bundle info --path jekyll-theme-chirpy`) to the same directory in your repository.
{: .prompt-tip }
[mathjax-exts]: https://docs.mathjax.org/en/latest/input/tex/extensions/index.html
## Mermaid
[**Mermaid**](https://github.com/mermaid-js/mermaid) is a great diagram generation tool. To enable it on your post, add the following to the YAML block: