I would like to render Markdown to HTML so that I could simply write markdown inside my HTML templates.
Example: home.html:
#This is a simple markdown in HTML
And I would like Django to interpret my Markdown and display it as if it was HTML:
<h1> This is a simple markdown in HTML </h1>
What would be the easiest way to implement it?
In order to do this, one would need to create a template filter that converts the Markdown text into HTML for the template.
Fortunately this is a common task and there are multiple packages that can help you.
Django Package - For use with django
Python Markdown - Python Markdown that you can use within the custom Django template filter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With