Skip to content
Open
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
33 changes: 1 addition & 32 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ const config: Config = {
blog: false,
sitemap: {
ignorePatterns: ['/search'],
changefreq: 'weekly',
priority: 0.5,
createSitemapItems: async ({defaultCreateSitemapItems, ...params}) => {
const items = await defaultCreateSitemapItems(params);
const { statSync } = await import('node:fs');
Expand All @@ -62,37 +60,9 @@ const config: Config = {

return items
.filter((item) => new URL(item.url).pathname !== '/search')
.map((item) => {
.map(({changefreq: _changefreq, priority: _priority, ...item}) => {
const pathname = new URL(item.url).pathname.replace(/\/$/, '') || '/';

let priority = 0.5;

if (pathname === '/') {
priority = 1;
} else if (pathname === '/intro') {
priority = 0.7;
} else if (pathname.startsWith('/getting-started')) {
priority = 0.8;
} else if (pathname.startsWith('/jira-integration')) {
priority = 0.7;
} else if (pathname.startsWith('/reporters')) {
priority = 0.7;
} else if (
[
'/features/bdd-coverage-agent',
'/features/bdd-library',
'/features/failure-inspection',
'/features/release-visibility',
'/features/release-management',
'/features/test-cycles',
'/features/test-run-summaries-in-jira-issues',
'/features/trends-analytics',
'/features/rovo-setup-agent',
].includes(pathname)
) {
priority = 0.6;
}

// Compute lastmod from source .md file modification time
let lastmod: string | undefined;
try {
Expand All @@ -106,7 +76,6 @@ const config: Config = {

return {
...item,
priority,
lastmod,
};
});
Expand Down