Skip to content

feat: add sitemap.xml for SEO improvement (#129)#130

Open
ankitrraj wants to merge 1 commit intoStabilityNexus:mainfrom
ankitrraj:feature/add-sitemap-129
Open

feat: add sitemap.xml for SEO improvement (#129)#130
ankitrraj wants to merge 1 commit intoStabilityNexus:mainfrom
ankitrraj:feature/add-sitemap-129

Conversation

@ankitrraj
Copy link
Copy Markdown

@ankitrraj ankitrraj commented Dec 13, 2025

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

  • Chores
    • Added XML sitemap containing site URL entries with update frequency and priority metadata to enhance search engine discoverability and indexing.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 13, 2025

Walkthrough

A 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

Cohort / File(s) Summary
Static Sitemap Configuration
static/sitemap.xml
Added new XML sitemap file with two URL entries: the main domain with weekly update frequency and 1.0 priority, and a /dev path with monthly frequency and 0.5 priority.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Single static file: No logic changes or complex interactions to evaluate
  • Standard format: XML structure adheres to sitemap schema conventions
  • Minimal scope: Two straightforward URL entries with standard priority and changefreq attributes

Poem

🐰 A map I've drawn with URLs so fine,
Two paths to follow, straight down the line,
Weekly and monthly, priorities bright,
Search engines now see our site's full height!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a sitemap.xml file for SEO improvement, which matches the changeset perfectly.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0e1ac3b and eedd75f.

📒 Files selected for processing (1)
  • static/sitemap.xml (1 hunks)
🔇 Additional comments (2)
static/sitemap.xml (2)

8-12: Verify that /dev is a production route.

The /dev route 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 noindex meta 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:

  1. Are these truly the only user-facing routes in the application?
  2. If there are more routes, are they intentionally excluded?
  3. 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.

Comment thread static/sitemap.xml
Comment on lines +1 to +13
<?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>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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:

  1. Generate the sitemap dynamically from application routes (with configurable base URL)
  2. Use environment variables/configuration to inject the domain at build or deployment time
  3. 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.

@ankitrraj
Copy link
Copy Markdown
Author

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.

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.

3 participants