Skip to content

Fix sitemap generator writing to wrong path#250

Merged
AmitMY merged 1 commit intomasterfrom
fix/sitemap-output-path
Mar 18, 2026
Merged

Fix sitemap generator writing to wrong path#250
AmitMY merged 1 commit intomasterfrom
fix/sitemap-output-path

Conversation

@HTMHell
Copy link
Contributor

@HTMHell HTMHell commented Mar 18, 2026

baseDir from path.resolve lacked a trailing separator, so the output path resolved to ".../translatedist/..." instead of ".../translate/dist/...".


Note

Low Risk
Low risk: adjusts how the sitemap output directory is constructed to avoid missing path separators; no changes to sitemap contents or runtime logic beyond path building.

Overview
Fixes tools/sitemap-generator.js to build buildDir using path.sep segments instead of string concatenation, ensuring the sitemap generator writes to .../translate/dist/... rather than an incorrect merged path.

Written by Cursor Bugbot for commit 52670b6. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Bug Fixes
    • Improved cross-platform compatibility for sitemap generation by ensuring proper path handling across different operating systems.

baseDir from path.resolve lacked a trailing separator, so the output
path resolved to ".../translatedist/..." instead of ".../translate/dist/...".
@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 65a00b2b-5e23-42d9-b7e9-45cdf2f7e6ad

📥 Commits

Reviewing files that changed from the base of the PR and between 3da86b7 and 52670b6.

📒 Files selected for processing (1)
  • tools/sitemap-generator.js

📝 Walkthrough

Walkthrough

Updated the build directory path construction in the sitemap generator to use cross-platform path separators via path.sep instead of hardcoded forward slashes, ensuring correct path handling across different operating systems.

Changes

Cohort / File(s) Summary
Cross-platform path handling
tools/sitemap-generator.js
Replaced hardcoded forward slashes with path.sep in the build directory path string for improved cross-platform compatibility.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A rabbit hops through paths so true,
Where slashes bend to platforms new,
No hardcoded / in sight,
With path.sep, all paths align just right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing the sitemap generator's path resolution issue by using cross-platform path separators.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sitemap-output-path
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@HTMHell HTMHell requested a review from AmitMY March 18, 2026 11:29
@AmitMY AmitMY merged commit c30592f into master Mar 18, 2026
5 of 6 checks passed
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.

2 participants