Feat/dynamic sitemap robots setup #2568
Open
+712
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace static sitemap and llms.txt generation with dynamic Next.js App Router implementation for both web client and docs applications. This implementation automatically discovers pages and
generates sitemaps +llms.txt +llms-full.txt + robots.txt files using Next.js built-in metadata routes.
Key Changes:
• Implement dynamic sitemap.ts and robots.ts files using Next.js App Router conventions
• Remove next-sitemap dependency from docs application
• Add automatic page discovery with configurable exclusion patterns
• Ensure proper SEO optimization with appropriate priorities and change frequencies
• Maintain consistency between robots.txt disallow rules and sitemap exclusions
Related Issues
Type of Change
[ ] Bug fix
[✓] New feature
[ ] Documentation update
[ ] Release
[✓] Refactor
[ ] Other (please describe):
Testing
Manual Testing Steps:
• Visit /robots.txt - should show proper disallow rules and sitemap reference
• Visit /sitemap.xml - should show all public pages with correct priorities
• Verify excluded routes (auth, API, user-specific) are not in sitemap
• Visit /robots.txt - should reference sitemap correctly
• Visit /sitemap.xml - should show docs homepage
• Verify old next-sitemap functionality is replaced
• Run bun install and bun build for both applications
• Confirm no next-sitemap related errors in docs build
Screenshots (if applicable)
Additional Notes
• Breaking Change: Removes next-sitemap dependency - docs application no longer needs postbuild script
• SEO Optimized: Homepage gets priority 1.0, marketing pages 0.9, auth pages 0.6
• Automatic: New pages are automatically included in sitemap without manual configuration
• Secure: Private routes (user dashboards, API endpoints) are automatically excluded
• Standards Compliant: Uses official Next.js metadata route conventions for better caching and performance
anthropic/claude-4-sonnet-20250522 (07:39 AM)
Important
Replaces static sitemap generation with dynamic Next.js App Router implementation, removing
next-sitemap
dependency and adding automatic page discovery with exclusion patterns.sitemap.ts
androbots.ts
.next-sitemap
dependency from docs application.robots.txt
disallow rules and sitemap exclusions.sitemap.ts
,robots.ts
, andsitemap-utils.ts
inapps/web/client/src/app
for dynamic sitemap and robots.txt generation.llms-full.txt/route.ts
andllms.txt/route.ts
inapps/web/client/src/app
anddocs/src/app
for documentation routes.next-sitemap.config.js
fromdocs
.This description was created by
for 9e8b196. You can customize this summary. It will automatically update as commits are pushed.