forem.dev Community

loading...

How to make code blocks appear on my website as they appear on Dev To.

the_greatbonnie profile image The Great Bonnie! ・1 min read

Am fetching articles from Dev To using the API and displaying them on my website. I would like to make code blocks appear on my website as they appear on Dev To. How can I make that possible on my Django project?

How the article looks on Dev To:

Alt Text

How it looks on my website:

Alt Text

Discussion (2)

pic
Editor guide
Collapse
coffeecraftcode profile image
Christina Gorton

Hey! I think similar to your other post this is something you will need to add on your end.
forem.dev/s_aitchison/comment/1ec

Collapse
ben profile image
Ben Halpern

Yeah, seeing the backticks makes me think maybe this is displaying markdown instead of compiled HTML?