gatsby: [gatsby-plugin-mdx] gatsby-remark-mathjax doesn't work

Description

gatsby-remark-mathjax doesn’t work with gatsby-plugin-mdx

Steps to reproduce

gatsby-mdx-minimal-repro-plugin-mathjax

http://localhost:8000/hello-world/ is rendered by gatsby-transformer-remark http://localhost:8000/hello-world-mdx/ is rendered by gatsby-plugin-mdx

Expected result

renders

This is my first post on my new fake blog! $a^2 + b^2 = c^2$ How exciting!
$$ a^2 + b^2 = c^2 $$

I’m sure I’ll write a lot more interesting things in the future.

Oh, and here’s a great quote from this Wikipedia on salted duck eggs.

i.e. Equation expressions as is.

Actual result

The mdx version renders <undefined></undefined> at the place of equation.

Environment

gatsby-mdx-minimal-repro-plugin-mathjax

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 20 (1 by maintainers)

Most upvoted comments

This issue is not about SSR.

It is about gatsby-plugin-mdx. gatsby-plugin-mdx claims that it’s compatible with plugins of gatsby-transformer-remark. But it doesn’t, I cannot find a way to render mathjax formula correctly, as what I can do with gatsby-transformer-remark.

@Mrazator I think you have misunderstandings here. This issue is saying that gatsby-remark-mathjax doesn’t provide the same, correct functionality working with gatsby-plugin-mdx as with gatsby-transformer-remark. Even it does, it doesn’t introduce server-side rendering and mathjax script is still required to display equations.

Any update here?