Fix Mathjs in Hugo

With the change to shortcodes, Hugo seemed to have drop support for inline HTML code in markdown. As written before, this causes a bit of an issue. Just now, I figured out that the math.js library wasn’t loaded and causes some posts to be affected. Hence, I’ve created a new shortcode calls mathjs.html. It is similar to this example[0].

cat mathjs.html 
<script type="text/javascript" async
  src="/js/MathJax.js?config=TeX-MML-AM_CHTML">
</script>

Now all posts that need math.js can include these lines with the following shortcode, Instead of having native HTML/JavaScript code. I’m not sure if I like it.



so far,
akendo

[0] https://gohugo.io/templates/shortcode-templates/#single-word-example-year