Repository navigation
Conversation
Derives the expected URL set from the same sources scripts/prerender.mjs renders (subject configs, info pages, SE/TE branches and their course data) and fails if a rendered page is missing from public/sitemap.xml or an entry points at a page that no longer exists. Also pins the canonical origin and trailing-slash form, changefreq/lastmod validity, homepage priority and the robots.txt sitemap reference. Co-authored-by: MaxwithU19 <156198184+MaxwithU19@users.noreply.github.com>
This branch has not been deployed
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.
What
Adds
tests/sitemap.test.ts: four tests that derive the expected sitemap URL set from the same sourcesscripts/prerender.mjsrenders (subject configs inscripts/pages/, info pages, SE/TE branches and theirseDatacourse lists, using the sameslugifyrule ascoursePath) and compare it againstpublic/sitemap.xml.Why
The two failures that hurt crawling are a prerendered page that never gets listed (invisible to Google) and a stale entry pointing crawlers at a removed page. Until now nothing caught either; this fails the test suite in both cases. It also pins the canonical origin and trailing-slash form,
changefreq/lastmodvalidity, homepage priority 1.0, and therobots.txtsitemap reference.Notes
/privacy/is prerendered but intentionally unlisted, which the test encodes.lastmod. That's valid per the sitemap protocol, so the test requires any presentlastmodto be a real, non-future date rather than requiring one everywhere.Checks
npm test).Co-authored-by: MaxwithU19 156198184+MaxwithU19@users.noreply.github.com