I want to render Gitlab’s discussion(comment, merge request…) in my webpage.
I thought about two ways.
First, Discussions API returns the markdown syntax text.
Then My web page will start rendering through the Markdown engine(js lib).
Second, Markdown API returns the interpreted html element.
Then My web page will start rendering through the CSS file.
I think the second way is easier.
I already found a simple css file, but I want the CSS that is officially provided by gitlab.
Can I get the Markdown CSS files provided by gitlab?
Well, when I use inspect element in Firefox, I can see a piece of markdown css, but that is embedded in a large css file. So you could extract the css from that, which sounds as a tedious job.
Even searched through my gitlab install, I don’t see any separate file for the Markdown. So I’m afraid the tedious option is the only one I can come up with.
Maybe https://about.gitlab.com/handbook/product/technical-writing/markdown-guide/ can give you more specific pointers
I’d like to second that request. Since there’s a /markdown endpoint, it seems pointless to me if one doesn’t have access to the CSS to render the HTML properly…
Specifically I’m working on a WordPress plugin to inject Markdown (and eventually other file types like Jupyter notebooks) directly into a post/page from any remote Git VCS. That works fine for Github/Bitbucket, I just didn’t get around adding Gitlab yet (should be a breeze, but well… time…).
So far I have to rely on Github’s /markdown endpoint, for which a well-maintained (unofficial) CSS project exists: https://github.com/sindresorhus/github-markdown-css/. I’d like to give the option to also use Gitlab’s rendering style, but I can’t since I don’t have access to the CSS. Scraping it together from huge CSS files is not an option for me
Maybe someone from @gitlab can comment? It’d be a really nice addition to the really nice markdown endpoint:)