A daily email digest that delivers the best comments from Hacker News directly to your inbox, beautifully formatted and ready to read.
- π§ Daily Email Delivery: Automatically sends a curated digest of HN's best comments
- π¨ Beautiful Formatting: Clean HTML email with proper styling and text fallback
- π Rich Metadata: Shows author, points, date, and comment content
- π Direct Links: Easy access to full discussions on Hacker News
- β‘ Reliable: Built-in error handling and notifications
The system fetches the RSS feed from hnrss.org/bestcomments, which aggregates newly emerging high-score comments across Hacker News. This feed typically contains around a dozen items daily, corresponding to 4-5 articles β a perfect amount for daily reading.
hn-best-comments-feed.ts
- Main cron job that runs daily to fetch and email the digesttest-hn-feed.ts
- HTTP endpoint for manually testing the email functionality
Each email includes:
- Header: Date and total number of comments
- Comment Cards: Each comment shows:
- Title/excerpt of the comment
- Author name and points received
- Publication date
- Truncated content (full content available via link)
- Direct link to the full comment thread
- Footer: Attribution and source information
The cron job is configured to run daily. To set the schedule:
- Go to the Val Town web UI
- Navigate to the
hn-best-comments-feed.ts
file - Set your preferred daily schedule (e.g.,
0 8 * * *
for 8 AM daily)
Use the test endpoint to manually trigger the email:
- Visit the
test-hn-feed.ts
HTTP endpoint - This will immediately fetch and send the current digest
- RSS Source: hnrss.org/bestcomments
- Email Service: Val Town's built-in email service
- Parsing: Custom XML/RSS parser for extracting comment data
- Formatting: Responsive HTML email with text fallback
- Error Handling: Automatic error notifications if the feed fails
As mentioned in the original request, HN's "Best Comments" feed is particularly valuable because:
- Quality Curation: High-score comments are typically well-researched and insightful
- Discovery: Comments often lead to quality discussions and posts outside your usual interests
- Manageable Volume: ~12 items daily is perfect for regular consumption
- Diverse Perspectives: Exposes you to discussions across various topics and domains
The feed serves as an excellent way to stay connected with the HN community's most valuable contributions without the overwhelming volume of the main feed.