# Converting links from raw markdown to HTML

**URL:** <https://meta.discourse.org/t/converting-links-from-raw-markdown-to-html/102422>\
**Category:** Development\
**Created:** [November 20, 2018, 9:16pm UTC](https://meta.discourse.org/t/converting-links-from-raw-markdown-to-html/102422 "2018-11-20T21:16:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [November 21, 2018, 12:14am UTC](https://meta.discourse.org/t/converting-links-from-raw-markdown-to-html/102422/2 "2018-11-21T00:14:54Z")

</div>

First, you need to decide if you want to have Markdown or HTML.  
Next, you need to either parse the Markdown or HTML and replace relative paths with absolute URLs or use a simple regex for find and replace. If you go with Markdown you’ll also need to handle the special `upload://` URLs.

You could either do this stuff with the API or write a plugin that adds a new route for rendering the modified Markdown or HTML. If you want everything to look exactly like it does in Discourse, I’d choose to generate HTML using a plugin.

---

_[View the full topic](https://meta.discourse.org/t/converting-links-from-raw-markdown-to-html/102422)._
