Building a Hacker News digest around discussion, not headlines

blog.alcazarsec.com · alcazar · 3 days ago · view on HN · tutorial
quality 2/10 · low quality
0 net
AI Summary

Alcazar Security built Top HN, a Hacker News digest that prioritizes discussion over headlines by filtering for stories with substantive comments, summarizing both articles and comment threads with citations, and storing canonical markdown for multi-format rendering.

Entities
Alcazar Security Hacker News Algolia Hacker News API Jina Reader
Building a Hacker News digest around discussion, not headlines · Technical Blog · Alcazar Security Published Feb 4, 2026 Building a Hacker News digest around discussion, not headlines Top HN is our daily Hacker News digest. It pulls the top stories for the day, writes a short summary of the link, then summarizes the comment thread with citations back to the original comments. We built it for a very Hacker News problem. The title gets you curious, but the real value is often buried in a 200-comment thread, a correction from someone who built the thing in 2009, or a reply that is smarter than the article itself. We did not want a list of links with generic AI blurbs attached. We wanted a short daily brief that captured what people were actually arguing about. Pick Stories People Argued About We fetch stories from the Algolia Hacker News API in a strict UTC day window. Then we sort by points and trim the list. That still is not enough. Hacker News regularly has stories that get a wave of upvotes but very little real discussion. Those are bad digest material. We filter for threads that look alive. If a story has very high points but too few comments, we drop it. The goal is not to mirror the front page. The goal is to find stories that produced useful conversation. Summarize The Link And The Thread For each selected story, we do two separate fetches. First, we fetch the Hacker News item page and pull out the top comments. We rank comments by replies, skip flagged comments, and keep the ones most likely to contain the real debate. Second, we fetch the story itself. Jina Reader is the happy path. If that fails, we fall back to parsing the raw HTML. If both fail, we still keep going with a thinner summary. Then we generate two pieces of text: A one-sentence summary of the article. A short summary of the comment thread with citations like [1] and [2] . Those citations are not cosmetic. We turn them into links to the actual Hacker News comments, so readers can jump straight to the source of a claim or anecdote. That makes the digest feel less like AI commentary and more like a guided map of the discussion. Store Markdown Once, Render It Everywhere The backend stores each story digest as markdown, with escaped text and safe links baked in. That gives us one canonical format for the web page and the RSS feed. The frontend turns the markdown into HTML for the daily page. The RSS endpoint renders the same content and escapes it for XML. We are not maintaining separate presentation pipelines for every surface. We store one durable artifact and render it where needed. Summary The interesting part of Hacker News is rarely the headline alone. It is the mix of the article, the rebuttals, the war stories, and the comment that explains the whole thing better than the link did. Our digest is built around that idea. Pick stories with real discussion. Summarize comments with citations. Reuse the same artifact everywhere. If you want to see the result, it is live at HN daily digest . ← Back to Tech Log