Menu

Building a Blog Platform with Docker #3: Markdown Rendering
πŸ“°

Building a Blog Platform with Docker #3: Markdown Rendering

DEV CommunityΒ·David TioΒ·7 months ago
#H3G0CA52
#python#flask#markdown#article#faq
Reading 0:00
15s threshold

Building a Blog Platform with Docker #3: Markdown Rendering

Quick one-liner: Stop writing HTML for your posts. Parse .md files with YAML frontmatter and render them in Flask.

Why This Matters

Last time you built a blog that looks like a blog. Teal nav, dark background, editorial post list. Nice.

But the post in that list? It's hardcoded HTML. Every time you want a new post, you have to edit a template. That's not a blog platform, that's a website.

A real blog platform lets you write a file, drop it in a folder, and have it appear. That's what Markdown gives you.

Why Markdown?

You write in plain text: no <p> tags, no &amp; , no forgetting to close a <div>

It's readable as-is, even before rendering

Every major writing tool supports it

Easy to version control in git

By the end of this post, you'll be able to drop a .md file into a folder and have Flask render it as a proper HTML page.

Starting Point

You should have this from last time:

tiohub-blog/ β”œβ”€β”€ app.py β”œβ”€β”€ static/ β”‚ └── js/ β”‚ └──…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.