-
Notifications
You must be signed in to change notification settings - Fork 7
Ai dev 3 #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ai dev 3 #112
Conversation
- Add Beehiiv blog posts to sitemap with correct dealscale.io URLs - Remove external URLs (YouTube, GitHub) that aren't allowed in sitemaps - Add comprehensive validation to filter empty/invalid URLs - Ensure all entries have required fields (lastModified, changeFrequency, priority) - Add local sitemap validation script (pnpm run validate:sitemap) - Fix property name consistency (changefreq -> changeFrequency) BREAKING CHANGE: External URLs removed from sitemap per Google Search Console requirements
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const blogPosts = await Promise.all( | ||
| posts.map(async (post) => { | ||
| // Construct dealscale.io URL format: /blogs/{post_id} | ||
| // Don't use post.web_url as it's likely a Beehiiv URL | ||
| const url = `${baseUrl}/blogs/${post.id}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sitemap now links blog posts to non-existent routes
The sitemap now forces every blog entry to ${baseUrl}/blogs/${post.id} and deliberately avoids the post.web_url Beehiiv link. The app only defines the /blogs index (no [id] or rewrite routes under src/app/blogs), so these generated URLs resolve to 404s while previously they pointed to the live Beehiiv pages. This leaves the sitemap advertising broken links to search engines whenever it is generated.
Useful? React with 👍 / 👎.
- Add /blogs/[id] route handler that redirects to Beehiiv URLs (301) - Fixes broken links in sitemap reported by code review - Allows sitemap to use dealscale.io URLs while redirecting to actual content - Handles missing posts gracefully with 404 or redirect to /blogs - Fix TypeScript errors in sitemap.ts - Add 'as const' assertions to changeFrequency values - Ensure proper literal type inference for MetadataRoute.Sitemap - Add explicit type validation for changeFrequency in final mapping - Add comprehensive sitemap validation tests (25 tests, all passing) - URL validation (canonical domain, format, duplicates) - Required fields validation (lastModified, changeFrequency, priority) - Content coverage (homepage, static pages, RSS feeds, blog posts, etc.) - Exclusions validation (no /careers, no external URLs) - Priority and change frequency distribution - Edge cases handling This ensures the sitemap is Google Search Console compliant and all URLs resolve correctly.
- Add /blogs/[id] route handler that redirects to Beehiiv URLs (301) - Fixes broken links in sitemap reported by code review - Allows sitemap to use dealscale.io URLs while redirecting to actual content - Handles missing posts gracefully with 404 or redirect to /blogs - Fix TypeScript errors in sitemap.ts - Replace 'as const' on expressions with proper type assertions - Use MetadataRoute.Sitemap type assertions for changeFrequency - Remove invalid type predicate from supplementalEntries filter - Add comprehensive sitemap validation tests (25 tests, all passing) - URL validation (canonical domain, format, duplicates) - Required fields validation (lastModified, changeFrequency, priority) - Content coverage (homepage, static pages, RSS feeds, blog posts, etc.) - Exclusions validation (no /careers, no external URLs) - Priority and change frequency distribution - Edge cases handling This ensures the sitemap is Google Search Console compliant and all URLs resolve correctly.
- Fix import organization in blog route handler - Remove unused imports from sitemap tests - Apply Biome formatting fixes to sitemap.ts
No description provided.