# What markdown parser Discourse is using?

**URL:** https://meta.discourse.org/t/what-markdown-parser-discourse-is-using/41938
**Category:** Development
**Created:** [April 2, 2016, 3:44pm UTC](https://meta.discourse.org/t/what-markdown-parser-discourse-is-using/41938 "2016-04-02T15:44:14Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![thangngoc89](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thangngoc89/32/115436_2.png) [@thangngoc89](https://meta.discourse.org/u/thangngoc89)
#### Post date: [April 2, 2016, 3:44pm UTC](https://meta.discourse.org/t/what-markdown-parser-discourse-is-using/41938/1 "2016-04-02T15:44:14Z")

</div>

I’m building a portal page for our community by using [Statinamic](https://github.com/MoOx/statinamic) (a static site generator) which will pull data from Discourse API and rebuild everyday.

But I can’t find a compatible Javascript markdown parser for Discourse so any pointers would be appreciated.

By the way, the portal is open source under MIT License. If anyone interested, please take a look at:

- Source : [GitHub - daynhauhoc/blog: Daynhauhoc.com blog · GitHub](https://github.com/thangngoc89/dnh-blog)
- Live website: [https://khoanguyen.me/dnh-blog/](https://khoanguyen.me/dnh-blog/)

---

<div class="post-metadata">

### Author: ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)
#### Post date: [April 2, 2016, 3:54pm UTC](https://meta.discourse.org/t/what-markdown-parser-discourse-is-using/41938/2 "2016-04-02T15:54:04Z")

</div>

Markdown.js

Most likely, it will be replaced by markdown-it for the next release.

> [@Discourse Version 1.6](https://meta.discourse.org/t/discourse-version-1-6/36402):
>
> Focuswhite_check_mark Three new bronze badges, for first use of emoji, first @name mention, first onebox white_check_mark add more stats on user summary page (most liked by, top links, etc) white_check_mark Convert header to vdom approach for speed (currently 100ms of 400ms topic load time is header) white_check_mark set global sanity limit on PM and topic lengths with two settings white_check_mark bootstrap mode for newly installed sites where TL1 is default and dail…

---

<div class="post-metadata">

### Author: ![thangngoc89](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thangngoc89/32/115436_2.png) [@thangngoc89](https://meta.discourse.org/u/thangngoc89)
#### Post date: [April 2, 2016, 4:05pm UTC](https://meta.discourse.org/t/what-markdown-parser-discourse-is-using/41938/3 "2016-04-02T16:05:56Z")

</div>

Thanks. I’ll take a look.

---

<div class="post-metadata">

### Author: ![thangngoc89](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thangngoc89/32/115436_2.png) [@thangngoc89](https://meta.discourse.org/u/thangngoc89)
#### Post date: [April 2, 2016, 5:46pm UTC](https://meta.discourse.org/t/what-markdown-parser-discourse-is-using/41938/4 "2016-04-02T17:46:14Z")

</div>

Do you happen to know how to get cooked version of post from post id ?

After a while, I think it’s much simpler if I just get the cooked HTML instead of convert markdown from raw content.

---

<div class="post-metadata">

### Author: ![erkist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erkist/32/53325_2.png) [@erkist](https://meta.discourse.org/u/erkist)
#### Post date: [April 2, 2016, 8:14pm UTC](https://meta.discourse.org/t/what-markdown-parser-discourse-is-using/41938/5 "2016-04-02T20:14:11Z")

</div>

Probably not the best way, one way to do it would be to issue a request to /p/{id} which will respond with a 302 pointing to the topic containing said post. Issuing a request there will then give you a cooked version of the response in `post_stream>posts>cooked`

---

<div class="post-metadata">

### Author: ![thangngoc89](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thangngoc89/32/115436_2.png) [@thangngoc89](https://meta.discourse.org/u/thangngoc89)
#### Post date: [April 2, 2016, 9:05pm UTC](https://meta.discourse.org/t/what-markdown-parser-discourse-is-using/41938/6 "2016-04-02T21:05:17Z")

</div>

Thanks 🙂 . But it looks like that endpoint contains too many information. I’ll find another way (our server is not in a good shape)

---

<div class="post-metadata">

### Author: ![thangngoc89](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thangngoc89/32/115436_2.png) [@thangngoc89](https://meta.discourse.org/u/thangngoc89)
#### Post date: [April 2, 2016, 10:09pm UTC](https://meta.discourse.org/t/what-markdown-parser-discourse-is-using/41938/7 "2016-04-02T22:09:30Z")

</div>

Well. This is configuration to make remark markdown to act the same as markdown.js

> <https://github.com/daynhauhoc/blog/blob/5d2016e6337d81dfd824f8d991cad2376896b10f/scripts/remark-renderer.js#L27-L32>
