Skip to content

Implement URL manifest system with permanent redirects#166

Merged
just-be-dev merged 3 commits intomainfrom
just-be/url-manifest
Jan 22, 2026
Merged

Implement URL manifest system with permanent redirects#166
just-be-dev merged 3 commits intomainfrom
just-be/url-manifest

Conversation

@just-be-dev
Copy link
Owner

@just-be-dev just-be-dev commented Jan 22, 2026

Overall just simplifies the URLs while maintaining backwards compatibility.

Summary

This PR implements a URL manifest system to make content URLs permanent. It replaces code-based routes with clean slug-based canonical URLs, while maintaining backwards compatibility through redirects. All content is accessible via short codes, legacy URLs, and custom slug aliases defined in frontmatter.

Key Changes

  • Replace code-based routes ([code]/[slug]) with slug-only routes ([slug])
  • Add URL manifest generator that maps codes to all URL variants
  • Implement middleware to handle redirects for short codes, legacy URLs, and custom slugs
  • Support custom slug aliases via frontmatter (e.g., /ccpm/projects/ccpm)
  • Update list pages to link to canonical slug-based URLs

Test Plan

  • Verify canonical URLs load correctly (e.g., /projects/devtools-fm)
  • Test short code redirects (e.g., /p1e73/projects/devtools-fm)
  • Test custom slug redirects (e.g., /ccpm/projects/ccpm)
  • Verify list pages display correct links
  • Build succeeds with no errors

🤖 Generated with Claude Code

- Replace code-based routes with slug-based canonical URLs
- Add URL manifest that maps codes to content paths for permanent redirects
- Implement middleware to handle short codes, legacy URLs, and custom slugs
- Support custom slug aliases via frontmatter (e.g., /ccpm → /projects/ccpm)
- Update list pages to link to canonical URLs
- Add documentation in CLAUDE.md

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 22, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
just-be-dev b84307c Commit Preview URL

Branch Preview URL
Jan 22 2026, 05:31 AM

just-be-dev and others added 2 commits January 22, 2026 00:29
Replace complex pattern matching with simpler code-segment detection.
Check if first or second URL segment is a code, then redirect to
canonical URL from manifest. Handles all redirect cases uniformly.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update tests to use the new 2-parameter signature (collection, slug)
instead of the old 3-parameter signature (collection, code, slug).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@just-be-dev just-be-dev merged commit b53cdfb into main Jan 22, 2026
2 checks passed
@just-be-dev just-be-dev deleted the just-be/url-manifest branch January 22, 2026 05:32
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