Skip to content

Hardcode projects list, remove CMS dependency#36

Merged
mikaalnaik merged 1 commit into
mainfrom
mikaal/list-sotn-in-projects-remove-election-tracker
Jul 20, 2026
Merged

Hardcode projects list, remove CMS dependency#36
mikaalnaik merged 1 commit into
mainfrom
mikaal/list-sotn-in-projects-remove-election-tracker

Conversation

@mikaalnaik

Copy link
Copy Markdown
Contributor

Summary

  • Moves the projects list off the York Factory /tools API and into hardcoded data at src/constants/projects.ts (same 8 projects, same order as production)
  • Serves project card images locally from public/projects/ instead of the CMS's Active Storage proxy
  • ProjectsGrid (no longer async) and sitemap.ts read from the constant; fetchTools and the YFTool type are removed
  • Fixes State of the Nation, which had a full URL as its slug and an empty url in the CMS — its card now correctly links to /state-of-the-nation

All existing ProjectsGrid props (includeSlugs, excludeSlugs, filter, featured, maxItems, columns) behave the same, so the homepage FeaturedProjects section is unaffected.

To add or reorder projects going forward, edit src/constants/projects.ts and drop an image into public/projects/.

Test plan

  • tsc --noEmit clean
  • eslint clean on changed files
  • Verify /projects renders all 8 cards with images
  • Verify homepage featured projects (Outcomes Tracker, Canada Spends) still render
  • Verify State of the Nation card links to /state-of-the-nation

🤖 Generated with Claude Code

Move the projects data from the York Factory /tools API into
src/constants/projects.ts and serve card images locally from
public/projects/. ProjectsGrid and the sitemap now read from the
constant; fetchTools and the YFTool type are removed.

Also fixes State of the Nation, which had a full URL as its slug
and an empty url in the CMS, so its card now links to
/state-of-the-nation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mikaalnaik
mikaalnaik merged commit e96124d into main Jul 20, 2026
1 check passed
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