Your RSS posts might only live half as long as everyone else's

Part of Beginner writer growth log Collection

Documenting my journey from zero to writer, including building a blog, managing social media, finding my voice, and all the struggles and growth along the way.

4 min read

Self-hosted static sites have a problem.

You almost never bother adding the actual time to your publish date.

If you publish today, you just write publishDate: 2026-04-10 in the markdown frontmatter.

Quick and easy. The exact time doesn’t really matter anyway.

But for RSS readers, this is a fatal mistake.

Why?

For RSS users, the Today tab is the main feed. It’s the “algorithm” of this social medium.

The Today algorithm in most RSS readers can only look at a post’s publish time (the pubDate in the RSS format) and keeps it around for roughly 24 hours.

If you don’t do anything special, your post defaults to UTC 0:00. That’s 8am in Taiwan, where most of my readers are.

If you actually publish at 8am, no problem. But if you’re like me, publishing at irregular hours, often late at night, and hitting publish instead of waiting until morning… you’ve got a big problem.

Say you publish at 11pm. Your post has to say goodbye at 8am like Cinderella, pushed out of the Today tab.

Everyone else’s posts get a full 24 hours of exposure. But because you “lied about your age,” your post only gets about 9 hours in your readers’ Today tab.

Worse, if your readers tend to read after 8am and only check Today, your post will never even appear there. By 8am, the RSS reader has already decided your post is over 24 hours old. The moment it fetches the article, it dumps it in with thousands of older posts.

The fix

So do we have to type the exact publish time every single time? That sounds annoying.

Nope. Here’s a trick: use the git commit time.

How does it work? It’s not some script that updates your frontmatter. Instead, you query git at build time.

I use Astro. When Astro builds the site, it generates the RSS XML. For each post’s <pubDate>, instead of using the date from frontmatter directly, I call a function that asks git: “When was this file first committed?”

git log --diff-filter=A --follow --format=%aI -1 -- "path/to/post"

This returns the exact commit time when the file was first added to git, down to the second.

So the flow looks like this:

  1. You write publishDate: 2026-04-10 in frontmatter (date only, no time)
  2. You finish the post at 11pm, git commit, and deploy
  3. At build time, the RSS generator queries git and finds the commit time: 2026-04-10T23:00:00+08:00
  4. That precise timestamp becomes the <pubDate> in your RSS feed

You don’t need to change any habits. Just write the date as usual. Git fills in the time.

Two edge cases to handle

Drafts committed early, published later

Sometimes I commit a post with draft: true first, tweak it over a few days, then remove draft: true to publish.

If we only look at the “file first added” time, we’d get the time from days ago when the draft was first committed, not the actual publish time.

So the code checks first: was the string draft: true ever modified in this file? If so, it uses that commit’s timestamp, which is the exact moment you removed draft: true and published for real.

git log -S "draft: true" --diff-filter=M --format=%aI -1 -- "path/to/post"

Committed early but not yet publish day

Sometimes you commit a finished post days before the publishDate. The git commit date and the publish date won’t match.

My approach: only use the git timestamp if the commit date falls on the same calendar day as publishDate. If they don’t match, fall back.

Fallback

If something goes wrong, we can always fall back to a fixed time. But if you don’t usually publish in the morning, I’d suggest setting it to 11am or noon instead of the default UTC 0:00. That way people who read at 9am won’t miss out.

While poking around NetNewsWire’s algorithm, I found that it actually shows future posts in Today. So if you really want to maximize your post’s lifespan, you could set it to 11pm. That would stretch your post’s Today lifespan from 24 hours to roughly 40.

I wouldn’t recommend it though. It feels like cheating, and not all RSS readers will show future posts. Better to just give your posts an honest 24 hours of exposure.

Closing thoughts

I only discovered this problem recently. And many people in my RSS feed have the same issue. People like Marcus, Jaron, Wen, Shuojen.

I think we write posts the way parents raise children. We want them to live a full life and have the chance to shine.

It’s a shame when a small oversight robs them of the lifespan they deserve.

Okay, it’s not actually as serious as raising children.

But still. Fix it now, or just feed this post to your AI. Let your future posts live the full life they were meant to.

(Though let’s be honest, not that many people use RSS anyway.)

Alex Hsu

Alex Hsu

Indie developer, AI music miner, aspiring writer, ADHD.
Documenting my journey of personal growth and the pursuit of simplicity.