« Back

The Best Way to Manage Blog Drafts with Markdown

10th June 2025

If you’ve ever tried to manage blog drafts in Markdown, you’ve probably ended up juggling filenames like post-idea-v3.md, draft-final-FINAL.md, or worse, entire folders full of “almost there” posts that you forgot about.

Markdown is an incredible format for writing, but draft management has always been a bit chaotic.

Let’s fix that.


Why Draft Management in Markdown Gets Messy

Unlike platforms like Medium or WordPress that have built-in draft status toggles, plain Markdown files don’t come with a concept of “draft” baked in. That means you’re left improvising your own workflow:

  • Keeping drafts in a separate folder
  • Renaming files with a -draft suffix
  • Adding inline TODOs or comments at the top
  • Using a Git branch or tag to hold unfinished work

These methods can work, but they’re inconsistent, difficult to scale, and make it easy to accidentally publish something that wasn’t ready.

There is a better way to handle this.


Use YAML Front Matter to Mark Drafts

The most elegant solution is to use YAML front matter, which is the metadata section at the top of your Markdown files.

Here’s a simple example:


---

title: "The Best Way to Manage Blog Drafts with Markdown"
date: 2025-06-10
draft: true

---

That draft: true line is the key.

When your static site generator or publishing platform respects this flag, it can exclude the file from being published, even if it is stored right alongside your live posts.

This approach keeps your content tidy, your workflow smooth, and your in-progress posts safe from public view.


How hosted.md Makes This Even Better

At hosted.md, we’re building draft support directly into the core experience.

  • Draft flag support: Posts with draft: true in their front matter will be excluded from the final site build automatically. No extra configuration is required.
  • 🧠 Default to published: If no draft flag is present, the post will be assumed to be ready for publication. This keeps things simple and intuitive.
  • 🛠 UI for editing front matter: You won’t need to manually edit YAML just to update a draft status. hosted.md will provide a clean interface for managing your post metadata, including toggling drafts on or off.
  • 👀 Draft overview (coming soon): We’re planning to add a dashboard that shows all your draft posts in one place. This feature will make it easier to manage unpublished content in a future release.

This setup combines the flexibility of Markdown with the convenience of a modern writing workflow.


A Simple, Sustainable Blogging Workflow

Here’s how you might use drafts on hosted.md:

  1. Start writing a new post in the editor, with draft mode enabled by default.
  2. Edit and iterate freely, without worrying about publishing too soon.
  3. Toggle off the draft flag in the UI or directly in the file’s front matter when you're ready to publish.
  4. Publish your site. hosted.md will automatically include the post in the build.

There’s no need to rename files, reorganize folders, or worry about accidental publishing.


Markdown Blogging Doesn’t Need to Be Hacky

Managing drafts should not be a hassle. With the right tools in place, it doesn’t have to be.

By combining Markdown with structured front matter and smart publishing logic, you can keep your workflow simple while staying fully in control of your content.

This is exactly the kind of experience we are creating with hosted.md. Our platform turns your Markdown files into a clean, customizable blog, without adding complexity.

Get Early Access to hosted.md

Sign up for the waitlist to be the first to know when hosted.md launches. Get updates on features, release dates, and early access opportunities.