Skip to content

build-pages: remove orphan project pages#149

Merged
ksimback merged 1 commit intomainfrom
cleanup-orphan-pages
May 1, 2026
Merged

build-pages: remove orphan project pages#149
ksimback merged 1 commit intomainfrom
cleanup-orphan-pages

Conversation

@ksimback
Copy link
Copy Markdown
Owner

@ksimback ksimback commented May 1, 2026

Summary

After generating project pages, scan projects/ for any *.html whose {owner}/{repo} no longer appears in data/repos.json and delete it. Removes the owner directory too if it ends up empty.

Why

Without this, removing a repo from data/repos.json leaves a stale project page on the live site indefinitely. Vercel hosts the committed HTML as a static file, so it survives every redeploy.

Concrete case: PR #148 removed Web3CZ/Web3Hermes from data/repos.json (account deleted on GitHub), but /projects/Web3CZ/Web3Hermes still serves the pre-removal HTML.

What it deletes

  • Any file matching projects/{owner}/{repo}.html whose {owner}/{repo} key is not in repos.json.
  • Owner directories that end up empty after cleanup.

Safe by construction: only walks projects/{owner}/*.html and matches against the canonical list — won't delete unrelated files.

Test plan

  • Local syntax check (node -c)
  • Merge → next build-pages run logs "Removed orphan: projects/Web3CZ/Web3Hermes.html" and commits the deletion
  • Confirm https://hermesatlas.com/projects/Web3CZ/Web3Hermes returns 404 after the rebuild lands

🤖 Generated with Claude Code

After generating project pages, scan projects/ for any *.html whose
{owner}/{repo} no longer appears in repos.json and delete it. Also
removes the owner directory if it ends up empty.

Without this, removing a repo from data/repos.json leaves a stale
project page on the live site indefinitely. Concretely: Web3CZ/Web3Hermes
was removed from repos.json in PR #148 (account deleted on GitHub),
but hermesatlas.com/projects/Web3CZ/Web3Hermes still serves the
pre-removal HTML because Vercel hosts the committed file as static
content. The next build-pages run after this lands will clean it up
automatically.

Safe by construction: only deletes files within projects/{owner}/*.html
that are not in the canonical repos.json list. Local dev runs are fine
— stale pages from prior local-only experimentation get garbage-
collected too.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hermes-ecosystem Ready Ready Preview, Comment May 1, 2026 5:01pm

Request Review

@ksimback ksimback merged commit 4d1b7b7 into main May 1, 2026
2 checks passed
@ksimback ksimback deleted the cleanup-orphan-pages branch May 1, 2026 17:15
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