Skip to content

Feat/dynamic sitemap robots setup #2568

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

itsNintu
Copy link
Collaborator

@itsNintu itsNintu commented Jul 31, 2025

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:

  1. Web Client (onlook.com):
    • 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
  2. Docs (docs.onlook.com):
    • Visit /robots.txt - should reference sitemap correctly
    • Visit /sitemap.xml - should show docs homepage
    • Verify old next-sitemap functionality is replaced
  3. Build Testing:
    • 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.

  • Behavior:
    • Replace static sitemap generation with dynamic Next.js App Router implementation in sitemap.ts and robots.ts.
    • Remove next-sitemap dependency from docs application.
    • Add automatic page discovery with exclusion patterns.
    • Ensure SEO optimization with priorities and change frequencies.
    • Maintain consistency between robots.txt disallow rules and sitemap exclusions.
  • Files:
    • sitemap.ts, robots.ts, and sitemap-utils.ts in apps/web/client/src/app for dynamic sitemap and robots.txt generation.
    • llms-full.txt/route.ts and llms.txt/route.ts in apps/web/client/src/app and docs/src/app for documentation routes.
    • Remove next-sitemap.config.js from docs.
  • Audit Report:
    • Highlights architecture, URL generation logic, file system access, and performance implications.
    • Recommends environment-aware URL generation, response caching, and content consistency.

This description was created by Ellipsis for 9e8b196. You can customize this summary. It will automatically update as commits are pushed.

itsNintu and others added 4 commits July 31, 2025 07:26
- Replace next-sitemap with native Next.js sitemap.ts and robots.ts files
- Add automatic page discovery for web client sitemap generation
- Create comprehensive sitemap utilities with SEO optimization
- Remove deprecated robots.txt route handler in docs
- Update docs package.json to remove next-sitemap dependency
- Add detailed implementation documentation in DYNAMIC_SITEMAP_SETUP.md
- Fix constants.ts formatting

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <[email protected]>
- Remove redundant /docs path from sitemap (docs.onlook.com/docs -> docs.onlook.com)
- Keep correct docs.onlook.com domain for both sitemap and robots

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <[email protected]>
Keep implementation documentation local only

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <[email protected]>
Copy link

vercel bot commented Jul 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 3, 2025 6:34am
web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 3, 2025 6:34am

Copy link

supabase bot commented Jul 31, 2025

This pull request has been ignored for the connected project wowaemfasoptxrdjhilu because there are no changes detected in apps/backend/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

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