Add `MathJax` support (#43)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
parent
4d264ee9a0
commit
0f46e1904f
16
README.md
16
README.md
|
@ -15,6 +15,22 @@ To add a new blogpost, please refer to `_posts/2023-06-20-vllm.md` as an example
|
||||||
|
|
||||||
The blog is automatically built and deployed by GitHub Actions when `main` is pushed to.
|
The blog is automatically built and deployed by GitHub Actions when `main` is pushed to.
|
||||||
|
|
||||||
|
## LaTeX Math
|
||||||
|
|
||||||
|
The blog supports LaTeX math via [MathJax](https://docs.mathjax.org/en/latest/index.html).
|
||||||
|
|
||||||
|
It can be enabled by adding `math: true` to the document frontmatter. It has been configured to support the standard LaTeX style math notation, i.e.:
|
||||||
|
|
||||||
|
```latex
|
||||||
|
$ inline math $
|
||||||
|
```
|
||||||
|
|
||||||
|
```latex
|
||||||
|
$$
|
||||||
|
math block
|
||||||
|
$$
|
||||||
|
```
|
||||||
|
|
||||||
## Theme customization
|
## Theme customization
|
||||||
|
|
||||||
The theme we are using is [Minima](https://github.com/jekyll/minima). If you need to customise anything from this theme, see [Overriding theme defaults](https://jekyllrb.com/docs/themes/#overriding-theme-defaults).
|
The theme we are using is [Minima](https://github.com/jekyll/minima). If you need to customise anything from this theme, see [Overriding theme defaults](https://jekyllrb.com/docs/themes/#overriding-theme-defaults).
|
|
@ -0,0 +1,12 @@
|
||||||
|
{% if page.math %}
|
||||||
|
<script>
|
||||||
|
MathJax = {
|
||||||
|
tex: {
|
||||||
|
inlineMath: [['$', '$'], ['\\(', '\\)']],
|
||||||
|
displayMath: [['$$', '$$'], ['\\[', '\\]']]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
Loading…
Reference in New Issue