Rendering GitLab Flavoured Markdown (with LaTeX Math) into HTML

Hi, so I’m having an issue here with the GitLab Flavoured Markdown, and the LaTeX Math.

We have some documentation .md files in a project that contain a good amount of Math in them. Now, this gets rendered when you see the rendered .md file on gitlab, but it appears there is a hard 2 second render limit. Because of this render limit, some of our bigger files with lots of math to render doesn’t get rendered all the way.

A solution to this problem was the idea that we could just render all the .md files ourselves and deploy them to GitLab Pages. Now this is where I’m hitting my problem. I can’t for the life of me figure out how to render GitLab Flavoured Markdown into HTML and still have the rendered math. I have attempted to use pandoc, kramdown with kramdown-math-katex and gitlab_kramdown. I have tried using the APIv4 Markdown call, but that seems to generate some sort of intermediate HTML that seems to get processed more somewhere else down the line to generate the math.

Perhaps I’m just looking in the wrong place? Is there some way that I can fully render our GitLab style markdown files into HTML so that we can host them on GitLab Pages?

2 Likes