Repository navigation
updates to the news feed #9
Description
Activity
also add new (brief) news articles (sort so most recent appears at the top):
-
January 10, 2025:
Title: Why are we so preoccupied by the past? Content: Check out our reflection on our recent paper on prediction and retrodiction in Scientific American; thumbnail:
-
August 1, 2025:
Title: Claudia Gonciulea joins the lab! Content: We've managed to recruit superstar-scientist Claudia Gonciulea to our incoming PhD student cohort at Dartmouth!
Link below: [READ CLAUDIA'S BIO]
Thumbnail:
-
July 1, 2024:
Title: Jeremy gets tenure! Content: Jeremy managed to sneak past the tenure review committee-- they never even noticed he was actually three kittens in a lab coat! He even picked up some awards along the way.
Thumbnail:
-
January 25, 2022:
Title: We CAREER'd! Content: The CDL was awarded an NSF CAREER Award to map and enhance how students learn, using natural language processing models. We're excited to do some awesome science with our new-found riches!
-
Implementation Plan for Issue #9: News Feed Updates
Overview
This issue has three main components:
- Convert news page to spreadsheet-based generation (like people, publications, software)
- Add Bluesky feed integration for @contextlab.bsky.social
- Add 4 new news articles from the comment
Phase 1: Spreadsheet-Based News Feed
1.1 Create Data Structure
Files to create:
data/news.xlsx- Single sheet with columns:date(YYYY-MM-DD format for sorting)title- News headlinetitle_url- Optional link for the headlinecontent- HTML-safe content (can include links)links_html- Additional links (e.g., "[READ BIO]")image- Thumbnail filename
Migrate existing news items from news.html to spreadsheet
1.2 Create Build Script
File:
scripts/build_news.py- Follow pattern of
build_people.pyandbuild_publications.py - Load data from
data/news.xlsx - Sort by date (most recent first)
- Generate HTML for each news item
- Inject into template
Functions:
load_news(xlsx_path)- Load and sort news itemsgenerate_news_item(item)- Generate HTML for single itemgenerate_news_content(items)- Generate full news list HTMLbuild_news(data_path, template_path, output_path)- Main build function
1.3 Create Template
File:
templates/news.html- Copy current
news.htmlstructure - Replace news items with
<!-- NEWS_CONTENT -->marker
1.4 Update Build Infrastructure
Files to modify:
scripts/build.py- Add news build to master scriptscripts/validate_data.py- Add news validation.github/workflows/build-content.yml- Add news.html to commit list
Phase 2: Bluesky Feed Integration
2.1 Architecture Decision
Client-side approach (recommended for static site):
- JavaScript fetches Bluesky posts at page load
- No server-side infrastructure needed
- Uses public Bluesky API (app.bsky.feed.getAuthorFeed)
API Endpoint:
https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed?actor=contextlab.bsky.social&limit=102.2 Implementation
Files to create/modify:
js/bluesky-feed.js- New module for Bluesky integrationfetchBlueskyPosts(handle, limit)- Fetch posts from APIrenderBlueskyPost(post)- Generate HTML for single postinitBlueskyFeed()- Initialize feed on page load
CSS additions to
css/style.css:.bluesky-feed- Container styling.bluesky-post- Individual post styling.bluesky-post-header- Avatar + handle + timestamp.bluesky-post-content- Post text.bluesky-post-embed- Images/links
2.3 Template Integration
Modify:
templates/news.html- Add Bluesky section with container div
- Include
js/bluesky-feed.jsscript
Phase 3: Add New News Articles
3.1 Download and Process Thumbnails
The comment provides 4 articles with GitHub-hosted images that need to be:
- Downloaded to
images/news/ - Renamed appropriately
- Possibly resized/bordered using existing scripts
New articles:
- "Why are we so preoccupied by the past?" (Jan 10, 2025)
- "Claudia Gonciulea joins the lab!" (Aug 1, 2025)
- "Jeremy gets tenure!" (Jul 1, 2024)
- "We CAREER'd!" (Jan 25, 2022)
3.2 Add to Spreadsheet
Add all 4 new articles to
data/news.xlsxwith proper dates for sorting.
Execution Plan (Parallel Agent Assignment)
Batch 1 (Can run in parallel):
- Agent A: Create
data/news.xlsxspreadsheet with all existing + new news items - Agent B: Create
scripts/build_news.pyfollowing existing patterns - Agent C: Create
templates/news.htmltemplate file
Batch 2 (After Batch 1):
- Agent D: Implement Bluesky feed JavaScript (
js/bluesky-feed.js) - Agent E: Add Bluesky CSS styles to
css/style.css
Batch 3 (After Batch 2):
- Agent F: Update
scripts/build.py,scripts/validate_data.py, and GitHub Actions workflow - Agent G: Download and process new thumbnail images
Batch 4 (Final integration):
- Agent H: Run full build and comprehensive testing
Testing Plan
Unit Tests (NO MOCKS - Real Files)
File:
tests/test_build_news.pytest_loads_news_from_real_xlsx()- Load actual news.xlsxtest_news_sorted_by_date()- Verify reverse chronological ordertest_generates_valid_html()- Check HTML structuretest_handles_empty_fields()- Graceful empty handlingtest_handles_special_characters()- HTML entities preserved
Integration Tests (Real Build)
test_build_produces_valid_news_html()- Full build creates valid filetest_news_count_matches_spreadsheet()- All items rendered
Bluesky Integration Tests (Real API)
File:
tests/test_bluesky_feed.py- Test fetching real posts from @contextlab.bsky.social
- Test HTML rendering of actual post data
- Test error handling for network failures
- Test rate limiting behavior
Visual Verification
- Open local
news.htmlin browser - Verify news items display correctly
- Verify Bluesky feed loads and displays
- Test on mobile viewport
Files to Create/Modify Summary
New Files:
data/news.xlsxscripts/build_news.pytemplates/news.htmljs/bluesky-feed.jstests/test_build_news.pytests/test_bluesky_feed.py
Modified Files:
scripts/build.py- Add news buildscripts/validate_data.py- Add news validationcss/style.css- Add Bluesky styles.github/workflows/build-content.yml- Add news.html to commitnews.html- Will be auto-generated
Notes Folder:
notes/issue_9_news_feed.md- Implementation notes and progress tracking
Cleanup Plan
Before signing off:
- Remove any temporary test files
- Clean up notes folder (keep only final summary)
- Remove any
.pycor__pycache__artifacts - Verify no debug code left in production files
Pre-Push Checklist
- Run
python scripts/validate_data.py- All validations pass - Run
python scripts/build.py- All builds succeed - Run
python -m pytest tests/ -v- All tests pass - Open
news.htmllocally - Visual verification - Check Bluesky feed loads correctly
- Run linters if configured
- Push to GitHub
- Verify GitHub Actions pass
- Check live site after deployment
Skills/Tools to Leverage
Existing:
utils.pyfunctions for spreadsheet loadingcitation_utils.pyfor link resolutionbuild_*.pypatterns for template injection
Potentially Create:
- Bluesky API helper skill for future use
- Image download/processing automation
Ready for review. Please approve or suggest modifications before implementation begins.
- added a commit that references this issue
on Dec 19, 2025 Completed in PR #11
News Feed Implementation
- Created
data/news.xlsxspreadsheet for managing news entries with columns: date, type (news/bluesky), title, description, image, link, bluesky_url - Built
scripts/build_news.pyto generate news.html from the spreadsheet - Added
templates/news.htmltemplate with proper structure
Bluesky Integration
- Implemented
js/bluesky-feed.jsfor embedding Bluesky posts from @contextlab.bsky.social - Posts are fetched client-side and displayed in a themed, scrollable feed
- Supports rich content including images, link cards, and quoted posts
- Added CSS styling in
css/style.cssto match the site's green theme
How to Use
- Manual news entries: Add rows to
data/news.xlsxwith type="news" - Bluesky embeds: Add rows with type="bluesky" and the post URL in bluesky_url column
- Run
python scripts/build_news.pyto regenerate news.html
The Bluesky feed automatically pulls the latest posts and displays them alongside manual news entries.
- Created

First, let's handle the news feed like we do the people, publications, and software pages (via spreadsheets).
Second, I'd like to add a bluesky feed (to the news page) for @contextlab.bsky.social that automatically pulls from bluesky to show a themed, scrollable list of the latest posts from the lab account.