feat: add sitemap.xml for SEO improvement (#129)#130
feat: add sitemap.xml for SEO improvement (#129)#130ankitrraj wants to merge 1 commit intoStabilityNexus:mainfrom
Conversation
WalkthroughA new static sitemap.xml file was added to the project containing two URL entries with their respective change frequencies and priority levels, conforming to the standard XML sitemap schema. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
static/sitemap.xml(1 hunks)
🔇 Additional comments (2)
static/sitemap.xml (2)
8-12: Verify that/devis a production route.The
/devroute included in the sitemap with a 0.5 priority suggests a development page. Exposing this in a public sitemap may indicate unintended disclosure of development features to search engines.Confirm whether this should be:
- Excluded from the production sitemap
- Protected from search engine indexing (via
noindexmeta tag or robots.txt disallow rule)- Included as a legitimate public route
1-13: Clarify route coverage and establish sitemap maintenance plan.The PR states the sitemap contains "all available routes," but only two entries are present. Confirm:
- Are these truly the only user-facing routes in the application?
- If there are more routes, are they intentionally excluded?
- How will the sitemap be updated when new routes are added?
For scalability, consider automating sitemap generation to avoid manual maintenance and inconsistency with actual application routes.
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | ||
| <url> | ||
| <loc>https://ergo.bene.stability.nexus/</loc> | ||
| <changefreq>weekly</changefreq> | ||
| <priority>1.0</priority> | ||
| </url> | ||
| <url> | ||
| <loc>https://ergo.bene.stability.nexus/dev</loc> | ||
| <changefreq>monthly</changefreq> | ||
| <priority>0.5</priority> | ||
| </url> | ||
| </urlset> |
There was a problem hiding this comment.
Hardcoded domain limits environment flexibility.
The sitemap uses a hardcoded domain (https://ergo.bene.stability.nexus/), which creates issues for development, staging, and production environments that may run on different domains or localhost. Static sitemaps are difficult to maintain and scale as the application grows.
Consider one of these approaches:
- Generate the sitemap dynamically from application routes (with configurable base URL)
- Use environment variables/configuration to inject the domain at build or deployment time
- Use a server-side route handler (e.g.,
/sitemap.xml) to generate the XML dynamically
🤖 Prompt for AI Agents
In static/sitemap.xml around lines 1 to 13 the sitemap contains a hardcoded base
domain which prevents using the same build across dev/staging/prod; replace this
static file with a solution that injects or generates the base URL at runtime:
either (A) change build/deploy to substitute an environment variable (e.g.,
SITEMAP_BASE_URL) into the sitemap during CI/CD, or (B) remove the static file
and implement a server-side /sitemap.xml handler that reads the configured base
URL from env/config and builds the XML from application routes (or a route list)
dynamically; ensure the generated <loc> values use the configured base URL and
keep changefreq/priority values intact.
|
Thanks for the review! This is a static site deployed to GitHub Pages with a fixed production domain (defined in static/CNAME). Since there are no staging or development environments, a static sitemap works well for this use case. If the project scales or adds multiple environments in the future, we can consider generating the sitemap dynamically. |
Added sitemap.xml to improve search engine optimization (SEO) for the platform.
Changes
Added static/sitemap.xml with all available routes
Includes home page (/) and dev page (/dev)
Why this is needed
Helps search engines (Google, Bing) discover and index pages efficiently
Improves site visibility in search results
Standard SEO practice for web applications
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.