Closed
Fix sitemap coverage for deployed HTML and locale variants#2562
Conversation
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot
AI
changed the title
Fix sitemap coverage for deployed HTML
Fix sitemap coverage for deployed HTML and locale variants
Jul 20, 2026
Copilot created this pull request from a session on behalf of
pethers
July 20, 2026 15:24
View session
pethers
marked this pull request as ready for review
July 20, 2026 15:31
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates sitemap generation and deployment to include generated analysis HTML pages (including locale-suffixed variants) so the public site and sitemap stay consistent.
Changes:
- Extend sitemap generation to accept and emit URLs for analysis HTML files, adding
hreflangalternates for locale clusters (plusx-default). - Add a generic recursive HTML collector (
collectHtmlFiles) and wire sitemap CLI to scan bothdocs/andanalysis/. - Add unit regression coverage for recursive analysis HTML discovery and locale alternates; update S3 deploy workflow to sync analysis HTML.
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/unit/sitemap-xml.test.js | Adds regression tests for recursive analysis HTML discovery and hreflang alternates for locale variants. |
| src/generators/sitemap/xml.ts | Adds analysis directory support, new analysisFiles parameter to generateSitemap, and buildAnalysisUrls() with locale alternate detection. |
| src/generators/sitemap/index.ts | Re-exports new sitemap APIs (collectHtmlFiles, SITEMAP_ANALYSIS_DIR). |
| src/generators/sitemap.ts | Updates sitemap CLI wiring to collect analysis HTML and pass it into sitemap generation; adjusts URL count logging. |
| scripts/generators/sitemap/xml.js | Compiled JS equivalent of the TypeScript sitemap updates (analysis URLs + locale alternates). |
| scripts/generators/sitemap/index.js | Compiled JS re-exports updated sitemap APIs. |
| scripts/generators/sitemap.js | Compiled JS CLI wiring updated to include analysis HTML in sitemap generation. |
| .github/workflows/deploy-s3.yml | Adds an explicit S3 sync pass for analysis/**/*.html (intended to publish generated analysis HTML). |
Files not reviewed (3)
- scripts/generators/sitemap.js: Generated file
- scripts/generators/sitemap/index.js: Generated file
- scripts/generators/sitemap/xml.js: Generated file
Comment on lines
+345
to
+355
| aws s3 sync "$SRC" "$BUCKET" \ | ||
| --checksum-algorithm SHA256 \ | ||
| --no-progress \ | ||
| --exclude '*' \ | ||
| --include 'analysis/**/*.html' \ | ||
| --cache-control 'public, max-age=3600, must-revalidate' \ | ||
| --content-type 'text/html; charset=utf-8' \ | ||
| --no-guess-mime-type \ | ||
| "${EXCL[@]}" \ | ||
| --exclude "analysis/*" \ | ||
| --include "analysis/**/*.html" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sitemap generation omitted generated analysis HTML and did not represent analysis locale variants. The deployment workflow also excluded analysis HTML from the published S3 site.
docs/andanalysis/..en.htmland.sv.html.hreflanglinks for each locale plusx-default.analysis/**/*.htmlto S3 while preserving existing exclusions.