-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat: implement sitemap generation in TypeScript and remove XML file #6206
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
Conversation
daniel-lxs
left a comment
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.
Hey @abumalick Thank you for the implementation, I left a couple of suggestions, let me know what you think!
apps/web-roo-code/src/app/sitemap.ts
Outdated
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.
I feel like we should address this as well.
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.
Pull Request Overview
This PR implements dynamic sitemap generation in TypeScript to replace the static XML sitemap file. The change enables indexing of multiple pages instead of just the root page, improving SEO coverage.
- Replaces static
sitemap.xmlwith dynamicsitemap.tsusing Next.js MetadataRoute - Adds automated script to update sitemap dates based on git history
- Configures site URL through environment variable for flexibility
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
scripts/update-sitemap-dates.js |
New utility script to automatically update sitemap dates from git history |
package.json |
Adds npm script for running sitemap date updates |
apps/web-roo-code/src/app/sitemap.xml |
Removes static XML sitemap file |
apps/web-roo-code/src/app/sitemap.ts |
Implements dynamic TypeScript sitemap with multiple pages |
apps/web-roo-code/.env.example |
Adds site URL configuration for sitemap generation |
|
You are welcome 👍🏻 |
|
Do you have time to review @mrubens ? |
|
I'm not an expert at this stuff, but could we use https://www.npmjs.com/package/next-sitemap? Seems like it would be nice to rely on a library for this logic (and seems like they might have more infrastructure for actually running the script automatically?) |
- Install next-sitemap as dev dependency - Add next-sitemap.config.cjs with proper configuration - Configure postbuild script to generate sitemap automatically - Add robots.txt generation - Remove custom sitemap.ts and update-sitemap-dates.js script - Add generated files to .gitignore - Add .npmrc to enable pre/post scripts for pnpm This provides better future-proofing with automatic page discovery, robots.txt generation, and more configuration options as suggested by @mrubens.
017d74b to
1c30381
Compare
|
mmh thank you for finishing this @daniel-lxs , I am able to contribute during the weekend only. |
daniel-lxs
left a comment
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.
Thank you @abumalick!
|
Thank you, @daniel-lxs. Ultimately, only one line of my code survived in the PR, so credit for this improvement should go to you in the release notes. I’m pleased that our work brought a valuable enhancement. |
|
@abumalick no worries, it was your idea and you laid the groundwork for us to complete it |
* main: (70 commits) fix: use native Ollama API instead of OpenAI compatibility layer (RooCodeInc#7137) feat: add support for OpenAI gpt-5-chat-latest model (RooCodeInc#7058) Make enhance with task history default to true (RooCodeInc#7140) Bump cloud version to 0.16.0 (RooCodeInc#7135) Release: v1.51.0 (RooCodeInc#7130) Add an API for resuming tasks by ID (RooCodeInc#7122) Add support for task page event population (RooCodeInc#7117) fix: add type check before calling .match() on diffItem.content (RooCodeInc#6905) (RooCodeInc#6906) Fix: Enable save button for provider dropdown and checkbox changes (RooCodeInc#7113) fix: Use cline.cwd as primary source for workspace path in codebaseSearchTool (RooCodeInc#6902) Hotfix multiple folder workspace checkpoint (RooCodeInc#6903) fix: prevent XML entity decoding in diff tools (RooCodeInc#7107) (RooCodeInc#7108) Refactor task execution system: improve call stack management (RooCodeInc#7035) Changeset version bump (RooCodeInc#7104) feat(web): fill missing SEO-related values (RooCodeInc#7096) Update contributors list (RooCodeInc#6883) Release v3.25.15 (RooCodeInc#7103) fix: add /evals page to sitemap generation (RooCodeInc#7102) feat: implement sitemap generation in TypeScript and remove XML file (RooCodeInc#6206) fix: reset condensing state when switching tasks (RooCodeInc#6922) ...
Related GitHub Issue
Closes: #5231 partially
Roo Code Task Context (Optional)
Description
Why? The previous sitemap was only indexing the root page.
Test Procedure
pnpm turbo build --filter=@roo-code/web-roo-codepnpm --filter @roo-code/web-roo-code startPre-Submission Checklist
Screenshots / Videos
Documentation Updates
Additional Notes
These changes are contributing the linked issue.
Get in Touch
Discord username: abumalick
Important
Implement TypeScript sitemap generation in
sitemap.tsand removesitemap.xml, indexing multiple pages.sitemap.ts.sitemap.xmlfile./,/enterprise,/evals,/privacy,/terms.MetadataRoutefromnextfor sitemap structure.lastModified,changeFrequency, andpriority.This description was created by
for fb193f79efcbb6d4015d31f6b9440123b90159c7. You can customize this summary. It will automatically update as commits are pushed.