Menu

1 / 2

Building a Blog Platform with Docker #4: Dynamic Routes and a Real Post List

DEV Community·David Tio·6 months ago
#RcnnfRca
#seo#python#flask#posts#article
Reading 0:00
15s threshold

🗂️ Building a Blog Platform with Docker #4: Dynamic Routes and a Real Post List

Quick one-liner: Replace the hardcoded route and static post list with a dynamic scanner that finds every .md file in your content folder — drop a file in, it appears on the homepage.

🤔 Why This Matters

After Episode 3 you can render a Markdown post. One post. At a hardcoded URL.

That's proof the plumbing works — but it's not a blog platform. To have a real blog, two things need to change:

The homepage should list all posts, sorted by date, pulled from actual files — not copied in by hand

The routes should be dynamic — any post at any date and slug should just work, without adding a new @app.route every time

While we're at it, there's a third thing worth doing now: SEO. The moment you have multiple real posts and real URLs, Google can find them. A <meta name="description"> tag is the minimum you need.…

Continue reading — create a free account

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