
LifeLog — why cards now show the publish date
The home looked messy — and nobody had noticed why
Every blog has a detail that goes unnoticed until someone points it out: the date the card shows.
On LifeLog, cards displayed date — the historical event date of the post being told. That’s a deliberate narrative choice (“the journey is documented as it happens”): a post about a May bug can be published in July, and the card shows “May”.
It works beautifully for retrospectives. But it has a side effect:
When you publish several posts on the same day (like the cyclic grid of 2 posts/day), the home shows a sequence like 07, 09, 09, 06, 06, 07 — which looks… wrong.
That’s exactly what Samuel pointed out: “posts out of order too”. The order was correct (by pubDate), but the cards displayed the historical dates — and the brain reads the displayed date as the ordering criterion.
The conflict: event date vs publish date
LifeLog has a dual date system in frontmatter:
date: 2026-08-06 12:00:00 -03:00 # when the EVENT happened
pubDate: 2026-08-09 16:00:00 -03:00 # when we PUBLISHED
- The home sorts by
pubDate(correct — most recently published first) - But PostCard displayed
date(historical) - Result: sorting and display disagreed → looked like a bug
The fix was one line in src/pages/index.astro and src/pages/en/index.astro:
date={post.data.pubDate || post.data.date}
The resolution — and what it revealed
With pubDate on the card, the home became consistent: 09, 09, 09, 09, 08, 08, 07, 07 — the displayed date now matches the ordering.
The lesson goes beyond dates: every displayed metric must use the same criterion as the ordering. A card that shows “07” but sits on top because it was published on the 9th creates cognitive dissonance — the user assumes it’s wrong, even when the underlying logic is correct.
Technical details
| Item | Before | After |
|---|---|---|
| Card shows | date (historical event) |
pubDate (publish) |
| Home sorts by | pubDate |
pubDate |
| Visual consistency | mixed dates | 09, 09, 08, 08… |
# PT and EN
sed -i "s/date={post.data.date}/date={post.data.pubDate || post.data.date}/" \
src/pages/index.astro src/pages/en/index.astro
npx astro build # 148 pages, clean build
And the portfolio?
The same discussion happened in the Portfolio: the RSS parser now sorts by pubDate desc and filters EN during parsing — ensuring the 3 “From the Blog” cards show the truly most recent posts, not the first ones in the XML.
The seemingly cosmetic detail — which date to show on a card — is actually a consistency contract between ordering and display.