Skip to content

Draw the events page from the blog, and fix the broken news feed - #219

Open
slarson wants to merge 2 commits into
masterfrom
events-from-blog
Open

Draw the events page from the blog, and fix the broken news feed#219
slarson wants to merge 2 commits into
masterfrom
events-from-blog

Conversation

@slarson

@slarson slarson commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

Two related changes: the news feed was broken in production, and the events page is now drawn from the blog instead of being hand-maintained.

Builds on @pgleeson's recent events additions and italics fixes — those are carried through intact.

The news feed was down

Tumblr has put its legacy /api/read/json endpoint behind a bot challenge. It returns 403 "Checking your browser…" to ordinary visitors, so news.html was showing "Unable to load news feed" on every page view.

Moved to the supported v2 API, which is auth-gated rather than bot-gated. It uses a read-only consumer key registered for the website alone — verified to return 401 on drafts, dashboard, and user info, so it can only read what is already public, and it is a different key from the one the posting tools use.

While in there: loadFullNewsFeed() was being called twice per page view — once from main.js and once from an inline script in news.html — so two overlapping requests raced to write the same list. That was the intermittent loading people saw. The client now keeps at most one request per query in flight and caches for 15 minutes.

Events now come from the blog

Adding an event means writing a blog post tagged event, not editing HTML.

Because a post's publication date is when an event was announced rather than when it happened, a post can also carry a date tag:

Tag Effect
event or events Puts the post on the events page (both spellings are already in use)
date:2026-09-15 The date the event happens
date:2026-01-29..2026-01-30 A multi-day event, rendered "Jan 29–30"

Events dated today or later appear under Coming up, the rest under Recently. A malformed date falls back to the post date rather than inventing one — Date.UTC silently rolls 2026-13-99 over to April 2027, so the values are round-trip validated.

All 20 previously hand-written events now exist as backdated posts, and the 5 existing posts that already covered an event have been tagged. The blog now has 20 posts tagged event, spanning 2011–2025.

The static list is unlinked, not deleted

Since every one of those events is now a post, rendering the hand-written list as well would show each event twice. The markup is kept in events.html, commented out, with a note explaining why. If the blog is ever lost or the tags removed, uncommenting restores the full 2011–2025 history with no research required.

Visual consistency

The events page had its own design language — pink and purple date cards in a different typeface — that did not match anything else on the site. It now uses the same layout as the news page: sidebar index, linked headings, muted dates.

Three rendering fixes came out of this, all affecting news too:

  • Species names are italicised at render time. Tumblr returns titles as plain text, so C. elegans was rendering upright next to hand-written entries that had it. Consistent with b845983 and b3aac53.
  • A title repeated at the top of its own body is dropped. NPF posts carry their title as a heading block inside the body, so titles were printing twice.
  • Titles derived from untitled photo posts cut at a sentence boundary rather than a fixed 120 characters. Note for anyone touching this: a naive split on ". " cuts "C. elegans" in half, so the boundary detection skips single-letter abbreviations.

Verification

Checked in a real browser, not just by status code:

  • News: 25 stories, 15 images, 25 sidebar links, no errors
  • Events: 21 events, 21 sidebar links, 0 duplicates, date ranges render as Jun 24–28, 2023
  • Cold load makes 1 request (was 2); reload makes 0 (cached)
  • pjax navigation News → Events loads correctly
  • All 20 archived titles and all 16 archived links verified byte-identical to master before and after

Note on two pre-existing data points

Not changed here, flagging rather than silently "fixing":

  • The entry titled "NeuroInformatics 2012" is dated 2011-09-10 — the title and date disagree.
  • "NeuroML Development Workshop" (2011-03-31) links to a neuroinformatics2011.org/abstracts/... URL identical to the NeuroInformatics 2011 entry, which looks like an old copy-paste.

Both are mirrored faithfully into the blog posts. Happy to correct both if they are errors.

🤖 Generated with Claude Code

slarson and others added 2 commits July 31, 2026 20:43
Tumblr put its legacy /api/read/json endpoint behind a bot challenge, so it
now answers 403 for ordinary visitors. The news feed had been failing with
"Unable to load news feed" on every page view. Move to the supported v2 API,
which is auth-gated rather than bot-gated, using a read-only consumer key
registered for the website alone - it can only read posts that are already
public and cannot post, edit, or see drafts.

Also fix the loading flakiness. loadFullNewsFeed() was being called twice on
every page view, once from main.js and once from an inline script in
news.html, so two overlapping requests raced to write the same list. The feed
client now keeps at most one request per query in flight and caches results
for fifteen minutes, so duplicate callers share a response instead of
fighting over the DOM.

Three rendering fixes came with the move to v2: species names are italicised
at render time (Tumblr returns titles as plain text), a title repeated at the
top of its own body is dropped, and titles derived from untitled photo posts
are cut at a sentence boundary rather than a fixed width - taking care not to
split "C. elegans" at its abbreviation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The events page was hand-maintained and its newest entry was July 2025. It
now renders from blog posts tagged "event" (or "events" - both spellings are
in use), so adding an event means writing a post rather than editing HTML.

Because a post's publication date is when an event was announced rather than
when it happened, a post may also carry a "date:2026-09-15" tag, or
"date:2026-01-29..2026-01-30" for something spanning several days. Events
dated today or later appear under "Coming up", the rest under "Recently".
Malformed dates fall back to the post date instead of inventing one.

The page also had a visual identity of its own that did not match anything
else on the site. It now uses the same layout as the news page - sidebar
index, linked headings, muted dates - so the two read as one site. Padraig's
recent additions and italics fixes are carried over intact.

All twenty previously hand-written events now exist as backdated posts, so
listing them here as well would show each one twice. The static markup is
kept in this file, commented out, as a fallback: if the blog is ever lost the
full 2011-2025 history is one uncomment away. The event tagging convention is
documented in TUMBLR_MIGRATION_README.md.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant