Search code examples
pythonmathherokumarkdownpelican

Markdown Math does not display correctly when deploying Pelican website to Heroku


Problem: I've downloaded the 'render_math' plugin for my pelican website to create math formulas in markdown. They display correctly when running locally using pelican --listen, but when I deploy the site to Heroku, the formulas do not display correctly, as shown in the picture below: enter image description here

My markdown for the formula:

## $$l_t=\beta_0+\beta_1l_{t-1} + \phi_1\epsilon_{t-1}+\epsilon_t$$

How it should look when viewed:

enter image description here

Attempted solution: I've included the following plugins path and the plugin used in my pelican config file, but to no effect and no errors are given. It should create a 'span' element in the HTML containing the Math, but it seems to only generate an 'H2' element.

PLUGIN_PATHS = ["/content/plugins"]
PLUGINS = ["render_math"] 

How can I make my math formulas display correctly using markdown when deploying the site to heroku?


Solution

  • The problem lay instead in how MathJax was added to the site and was causing mixed content errors. I switched the CDN link from HTTP to HTTPS, which solved my issue.