# Importing posts with Markdown

**URL:** <https://meta.discourse.org/t/importing-posts-with-markdown/282635>\
**Category:** Migration\
**Created:** [October 18, 2023, 12:09pm UTC](https://meta.discourse.org/t/importing-posts-with-markdown/282635 "2023-10-18T12:09:55Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![n1bff](https://avatars.discourse-cdn.com/v4/letter/n/e95f7d/32.png) [@n1bff](https://meta.discourse.org/u/n1bff)\
**Post date:** [October 18, 2023, 12:09pm UTC](https://meta.discourse.org/t/importing-posts-with-markdown/282635/1 "2023-10-18T12:09:55Z")

</div>

I rewrote [discourse/script/import\_scripts/json\_generic.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/main/script/import_scripts/json_generic.rb) a bit for my own data. It works well but I cannot figure out how to have Discourse use Markdown in the imported posts.

For example a post might be  
` **some text here in bold** and something else here`  
After importing Discourse shows it verbatim like that, not using the `**` Markdown syntax to bold the “some text here in bold” part. And weirdly also if I try to edit such a post using the normal Discourse GUI, it will ignore any formatting.

The import script uses  
`cook_method: Post.cook_methods[:raw_html],`  
I also tried  
`cook_method: Post.cook_methods[:regular],`  
without any visible change.

How can I make Discourse recognise Markdown when importing data?

---

_[View the full topic](https://meta.discourse.org/t/importing-posts-with-markdown/282635)._
