Learn how to render Markdown in your Elixir and Phoenix applications using MDEx.
In this tutorial, we'll build a blog application where posts are written in Markdown and beautifully rendered with syntax highlighting, headers, and proper typography.
🔗 Resources
MDEx website: https://mdelixir.dev/
MDEx documentation: https://hexdocs.pm/mdex
Tailwind Typography: https://tailwindcss.com/docs/typograp...
MDEx Usage Rules: https://github.com/leandrocp/mdex/blo...
What You'll Learn
Using `to_html` function for dynamic content from database
Leveraging the compile-time MDEx sigil (~MD) for better performance
Working with assigns and dynamic values in Markdown
Integrating Markdown rendering in Phoenix LiveView
Adding Tailwind Typography plugin for beautiful formatting
Using HEEx sigil to mix Markdown with Phoenix components