Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/link-check-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
run: make test 2>&1 | tee link-check.log
env:
CI: 'true'
# Crawl every built version (via sitemap-full.xml), not just latest. This job is
# non-blocking and files an issue on failure, so it is the safe place to surface the
# full-version backlog. PR CI stays latest-only until the backlog is cleared.
FULL_COVERAGE: 'true'

- name: Upload the link-check log
if: always()
Expand Down
6 changes: 5 additions & 1 deletion __tests__/crawler.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ test('Crawl the docs and execute tests', async () => {
const varSkipList = ['{{end}}'];
const liquidRegex = /\{%.*?%}/gs;
const liquidSkipList = [];
const SITEMAP = 'sitemap.xml';
// FULL_COVERAGE seeds the crawl from the all-versions sitemap (sitemap-full.xml) instead of the
// latest-only sitemap.xml. Used by the weekly job; leave off for PR CI until the backlog is fixed.
const fullCoverage = process.env.FULL_COVERAGE === 'true';
const SITEMAP = fullCoverage ? 'sitemap-full.xml' : 'sitemap.xml';
const SITEMAP_URL = `${DOCS}/${SITEMAP}`;
const USE_LC = [
{ regex: inspectFilesRegExp(), processContent: true },
Expand Down Expand Up @@ -612,6 +615,7 @@ test('Crawl the docs and execute tests', async () => {
await crawler.addRequests(urls);

console.log(`Crawling the docs (${DOCS}) and executing tests.`);
console.log(`Coverage: ${fullCoverage ? 'FULL (all versions)' : 'latest only'} via ${SITEMAP}.`);
console.log(`Localhost mode is ${isLocalHost ? 'ON' : 'OFF'}.`);
console.log(`Validity tests on code blocks: ${validityTest.length ? validityTest.join(',') : 'none'}`);
console.log(`Validity tests on files: ${validityTestFiles.length ? validityTestFiles.join(',') : 'none'}`);
Expand Down
13 changes: 13 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,19 @@ export default async function createAsyncConfig() {
},
},
plugins: [
// Second sitemap instance for the internal link checker only. The preset sitemap above
// stays latest-only for SEO (sitemap.xml, the one advertised in robots.txt). This one has
// no version ignorePatterns, so it lists every built version at sitemap-full.xml. The
// crawler seeds from it when FULL_COVERAGE=true; it is not referenced in robots.txt.
[
'@docusaurus/plugin-sitemap',
{
id: 'full',
filename: 'sitemap-full.xml',
lastmod: 'date',
ignorePatterns: [],
},
],
'docusaurus-plugin-sass',
[
'@docusaurus/plugin-content-docs',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@docusaurus/core": "^3.10.1",
"@docusaurus/faster": "^3.10.1",
"@docusaurus/plugin-content-docs": "^3.10.1",
"@docusaurus/plugin-sitemap": "3.10.1",
"@docusaurus/preset-classic": "^3.10.1",
"@docusaurus/theme-common": "^3.10.1",
"@docusaurus/theme-search-algolia": "^3.10.1",
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20109,6 +20109,7 @@ __metadata:
"@docusaurus/faster": "npm:^3.10.1"
"@docusaurus/module-type-aliases": "npm:^3.10.1"
"@docusaurus/plugin-content-docs": "npm:^3.10.1"
"@docusaurus/plugin-sitemap": "npm:3.10.1"
"@docusaurus/preset-classic": "npm:^3.10.1"
"@docusaurus/theme-common": "npm:^3.10.1"
"@docusaurus/theme-search-algolia": "npm:^3.10.1"
Expand Down