Skip to content
About

The Draft That Escaped Into the Wild

My post template was rendering as a live article on the blog — fixed the filtering and cleaned out some leftover files.

1 min readEvergreen7:21amMiami Beach, FL, USA

At some point, my blog had a template file — a blank example post with placeholder text and brackets where the content should go. The kind of file you keep around as a reference.

And then I found out it was showing up on the live blog. As a real post. For anyone who navigated to it.

What happened

The site was showing every single post file it found, no questions asked. There was no filter for "is this actually published?" So a leftover POST_TEMPLATE.md file sitting in the posts folder was being served alongside the real articles.

I added a filter. Any post with published: false — or no publishing flag at all — is now hidden everywhere: the homepage, search results, tag pages, the sitemap, the RSS feed, all of it.

Then I deleted the template file and an old TODO file that had also been sitting there for who knows how long.

Also added faster image handling so photos on the site are smaller and quicker to load.

The uncomfortable part

The template was probably live for a while. I don't know exactly how long. At least the fix was thorough — eight separate parts of the site now properly ignore unpublished content, not just the homepage.


PR: https://github.com/StevieIsmagic/vercel_blog/pull/18

Related posts

Stay in the loop

Newsletter launching soon — follow along via RSS.