We use MathJax on our course website, which is implemented in Jekyll and hosted on GitHub pages. For small, straightforward equations, MathJax works great but I've never been able to get even slightly more complicated equations to work. I've spent many hours investigating and experimenting, so I thought I'd finally ask here.
For example, the following fails to render:
$$
S_{i} =
\begin{cases}
X_{1} & \text{if i = 1}\\
\alpha \cdot X_{i} + (1 - \alpha) \cdot S_{i-1} & \text{if i $>$ 1}
\end{cases}
$$
The rendered output in the web browser is literally blank.
When I look at the rendered html, I see:
<p>
<span class="MathJax_Preview" style="color: inherit; display: none;"></span>
<span id="MathJax-Element-5-Frame" class="mjx-chtml MathJax_CHTML" tabindex="0" data-mathml="
<math
xmlns="http://www.w3.org/1998/Math/MathML" />" role="presentation" style="font-size: 113%; position: relative;">
<span id="MJXc-Node-149" class="mjx-math" aria-hidden="true">
<span id="MJXc-Node-150" class="mjx-mrow"></span>
</span>
<span class="MJX_Assistive_MathML" role="presentation">
<math
xmlns="http://www.w3.org/1998/Math/MathML">
</math>
</span>
</span>
<script type="math/tex" id="MathJax-Element-5">%
<![CDATA[ S_{i} = \begin{cases} X_{1} & \text{if i = 1}\\ \alpha \cdot X_{i} + (1 - \alpha) \cdot S_{i-1} & \text{if i $>$ 1} \end{cases} %]]>
</script>
</p>
I'm not a LaTeX expert so I often write equations (or at least check them) in online editors like https://www.codecogs.com/latex/eqneditor.php or OverLeaf. They render fine there.
I asked this first (link) at the tex StackExchange but they said it was offtopic.
UPDATE: I ended up asking this on the MathJax user group (link) and received a working solution, which is described in detail on GitHub. Thanks all for your responses!