Repository navigation
Migrate Blog section routes and labels from /blog to /blogs - #82
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: SamRepository25 <226889074+SamRepository25@users.noreply.github.com>
Co-authored-by: SamRepository25 <226889074+SamRepository25@users.noreply.github.com>
/blog to /blogs
SamRepository25
left a comment
There was a problem hiding this comment.
Review PR #82 again before merging.
I inspected the generated diff and found that the migration appears incomplete.
The goal is a clean Blog → Blogs migration:
OLD:
/blog
/blog/$slug
NEW:
/blogs
/blogs/$slug
Please fix the following issues without changing anything unrelated.
- GENERATED ROUTE TREE
src/routeTree.gen.ts still appears to contain both the old /blog routes and the new /blogs routes.
After the route files were renamed, regenerate the TanStack Router route tree from the actual filesystem.
The final generated route tree must NOT retain stale route definitions for:
/blog
/blog/$slug
unless a deliberate compatibility redirect is explicitly implemented elsewhere.
Do not manually edit generated routeTree.gen.ts if the project has a route generation command. Use the project's existing route generation/build process.
- SITEMAP
public/sitemap.xml currently appears to contain BOTH:
/blog/article-slug
/blogs/article-slug
This is incorrect for the migration.
Remove the old /blog article URLs from the sitemap.
The final sitemap should contain only:
/blogs
/blogs/
for the blog section.
Do not duplicate article URLs.
- LEGACY URL COMPATIBILITY
I want /blog to be replaced by /blogs.
Before removing legacy compatibility, inspect the existing routing architecture.
If the safest implementation is to preserve old URLs for users/search engines, implement a proper redirect:
/blog -> /blogs
/blog/:slug -> /blogs/:slug
Do NOT keep duplicate page routes serving the same content.
A redirect is acceptable.
Duplicate active routes are not.
- VERIFY ALL INTERNAL LINKS
Search the entire repository for actual application references to:
/blog
Make sure all internal navigation intended for the Blog section uses:
/blogs
and article navigation uses:
/blogs/$slug
Do not blindly replace unrelated text containing the word "blog".
- VERIFY ROUTE FILES
The expected route files should be:
src/routes/blogs.tsx
src/routes/blogs_.$slug.tsx
There should not be stale active route files:
src/routes/blog.tsx
src/routes/blog_.$slug.tsx
unless they are intentionally being used solely for a redirect.
- SEO
Keep:
Blogs — CodeForge
and:
https://codeforgedev.vercel.app/blogs
as the canonical URL for the listing page.
Article canonical URLs should use:
https://codeforgedev.vercel.app/blogs/
Do not leave duplicate canonical/indexable versions under /blog.
- FINAL VALIDATION
Run the existing project commands from package.json.
At minimum verify:
- TypeScript passes
- lint passes if configured
- production build passes
- TanStack route generation passes
- /blogs loads
- /blogs/ loads
- Navbar → Blogs works
- Footer → Blogs works
- homepage Blog/Blogs CTA works
- dashboard/admin article links work
- search URL uses /blogs
- sitemap contains no duplicate old /blog article URLs
Also search the final source tree for:
/blog
and review every remaining occurrence manually.
Do NOT remove legitimate occurrences such as:
- the word "blog" in article content
- documentation
- comments
- database field names
- unrelated external URLs
- IMPORTANT
Do not redesign the website.
Do not modify:
- colors
- typography
- layout
- animations
- blog content
- Supabase
- authentication
- MFA
- database schema
- security
- AI tools
- unrelated routes
- dependencies
This is strictly a route migration and UI label change.
After fixing it, report:
- exact files changed
- whether old /blog routes remain
- whether redirects were added
- sitemap result
- route-tree result
- build result
- type-check result
- lint result
- any remaining /blog references and why they remain
Do not mark the PR ready to merge until these checks pass.
Re-verified at current HEAD ( |
This PR performs a surgical Blog → Blogs migration in the TanStack Router app: the listing route moves from
/blogto/blogs, and related navigation/SEO references are updated consistently. Article routing is migrated in lockstep to/blogs/$slugto keep listing-to-article navigation and generated route types coherent.Route migration (listing + articles)
src/routes/blog.tsx→src/routes/blogs.tsxsrc/routes/blog_.$slug.tsx→src/routes/blogs_.$slug.tsxcreateFileRoute("/blog")→createFileRoute("/blogs")createFileRoute("/blog_/$slug")→createFileRoute("/blogs_/$slug")/blog/$slugto/blogs/$slugwhere routed viaLink.UI labels and section entry points
Blog→Blogsin:src/components/Navbar.tsxsrc/components/Footer.tsxThe blog→The blogsBlog — CodeForge→Blogs — CodeForgeInternal navigation references
/blog→/blogsin:src/routes/index.tsx)src/routes/thank-you.tsx)src/routes/_authenticated/dashboard.tsx)/blogs/$slug(dashboard/admin/home/blog pages).SEO and sitemap alignment
/blogsinsrc/routes/blogs.tsx./blogs?q=...insrc/routes/__root.tsx.public/sitemap.xmlupdated:/blog→/blogs/blog/...→/blogs/...Generated route tree
src/routeTree.gen.tsto reflect renamed files and new/blogs+/blogs/$slugpaths.