Hugo Tips

Posted by Matt Wang on Thursday, June 11, 2020

Shortcode Collection

Enable MathJax

Add following lines into theme/<theme>/layout/partials/math.html


<script type="text/x-mathjax-config">
  MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$']]}  });

and put following lines in any template that the target page used:

{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ end }}

and then put the parameter math: true in the header of the article page to enable MathJax.

Simple SEO