<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/render-markdown-in-elixir---mdex-33svun1xd" -->

---
title: Render Markdown in Elixir - MDEx | daily.dev
description: A walkthrough of integrating MDEx into a Phoenix blog application to render Markdown as HTML. Covers adding MDEx as a dependency, using the `to_html` function...
canonical: https://daily.dev/posts/render-markdown-in-elixir---mdex-33svun1xd
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Render Markdown in Elixir - MDEx | daily.dev
og:description: A walkthrough of integrating MDEx into a Phoenix blog application to render Markdown as HTML. Covers adding MDEx as a dependency, using the `to_html` function...
og:url: https://daily.dev/posts/render-markdown-in-elixir---mdex-33svun1xd
og:image: https://api.daily.dev/og/posts/33sVUN1xd.png
og:image:alt: Render Markdown in Elixir - MDEx
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Render Markdown in Elixir - MDEx

**[ElixirStatus](https://daily.dev/sources/elixirstatus)** · 9 min read · 0 upvotes · 0 comments

## Summary

A walkthrough of integrating MDEx into a Phoenix blog application to render Markdown as HTML. Covers adding MDEx as a dependency, using the `to_html` function for dynamic content, the compile-time `~MD` sigil for static content, handling errors gracefully, and using the HEEx sigil variant to embed Phoenix components and assigns inside Markdown. Also shows enabling Tailwind's typography plugin for proper heading and prose formatting, plus syntax highlighting out of the box.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://youtu.be/lKrYvDceKfw>

## Similar posts on daily.dev

- [Moving my website from NextJS to Phoenix](https://daily.dev/posts/moving-my-website-from-nextjs-to-phoenix-ijyegqx4q) · ElixirStatus · 33 upvotes · 4 comments
- [Elixir Programming Language Forum](https://daily.dev/posts/elixir-programming-language-forum-bdlkzxb8w) · Elixir Forum · 1 upvotes · 0 comments
- [Texttile, a multiplayer blog engine for people who write together – Klaus Breyer](https://daily.dev/posts/texttile-a-multiplayer-blog-engine-for-people-who-write-together-klaus-breyer-7lmmhkexm) · Awesome Elixir · 0 upvotes · 0 comments
- [Create a Markdown Editor in Ruby on Rails](https://daily.dev/posts/create-a-markdown-editor-in-ruby-on-rails-mhtcschr2) · RUBYLAND · 0 upvotes · 0 comments
- [dannote/phoenix\_streamdown: Streaming markdown renderer for Phoenix LiveView, optimized for LLM output](https://daily.dev/posts/dannote-phoenix-streamdown-streaming-markdown-renderer-for-phoenix-liveview-optimized-for-llm-outp-5bpdnzg5n) · ElixirStatus · 1 upvotes · 0 comments

---

Tags: [#tailwind-css](https://daily.dev/tags/tailwind-css), [#elixir](https://daily.dev/tags/elixir), [#markdown](https://daily.dev/tags/markdown)

[View this post on daily.dev](https://daily.dev/posts/render-markdown-in-elixir---mdex-33svun1xd)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Render Markdown in Elixir - MDEx","url":"https://daily.dev/posts/render-markdown-in-elixir---mdex-33svun1xd","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/render-markdown-in-elixir---mdex-33svun1xd"},"datePublished":"2026-03-12T09:42:21.432Z","dateModified":"2026-03-12T09:42:39.241Z","description":"A walkthrough of integrating MDEx into a Phoenix blog application to render Markdown as HTML. Covers adding MDEx as a dependency, using the `to_html` function...","image":"https://i.ytimg.com/vi/lKrYvDceKfw/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/lKrYvDceKfw/sddefault.jpg","isAccessibleForFree":true,"articleSection":"ElixirStatus","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ElixirStatus","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/22e4640538124187827caf8cc8e39190","url":"https://daily.dev/sources/elixirstatus"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/render-markdown-in-elixir---mdex-33svun1xd","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"tailwind-css,elixir,markdown","timeRequired":"PT9M","video":{"@type":"VideoObject","name":"Render Markdown in Elixir - MDEx","description":"A walkthrough of integrating MDEx into a Phoenix blog application to render Markdown as HTML. Covers adding MDEx as a dependency, using the `to_html` function...","thumbnailUrl":"https://i.ytimg.com/vi/lKrYvDceKfw/sddefault.jpg","uploadDate":"2026-03-12T09:42:21.432Z","duration":"PT9M","url":"https://api.daily.dev/r/33sVUN1xd","embedUrl":"https://www.youtube.com/embed/lKrYvDceKfw"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ElixirStatus","item":"https://daily.dev/sources/elixirstatus"},{"@type":"ListItem","position":3,"name":"Render Markdown in Elixir - MDEx"}]}
```

