Skip to content

SEO Optimization: Sitemap and duplicate "RavenDB Documentation"#2381

Merged
ppekrol merged 4 commits intoravendb:mainfrom
poissoncorp:claude-fixes
Apr 2, 2026
Merged

SEO Optimization: Sitemap and duplicate "RavenDB Documentation"#2381
ppekrol merged 4 commits intoravendb:mainfrom
poissoncorp:claude-fixes

Conversation

@poissoncorp
Copy link
Copy Markdown
Contributor

Additional description

  • Fix duplicate brand name in homepage <title> tag — was rendering as "RavenDB Documentation — Guides, API Reference & Tutorials | RavenDB Documentation", now renders as "Guides, API Reference & Tutorials | RavenDB Documentation"
  • Split single flat sitemap into a sitemap index with per-section sub-sitemaps — replaces the monolithic sitemap.xml (800+ URLs) with a <sitemapindex> referencing sitemap-docs-{version}.xml, sitemap-cloud.xml, sitemap-guides.xml, and sitemap-misc.xml. Improves crawl management for search engines and provides clearer segmentation in Google Search Console.

Changes

docs/home.mdx
Remove redundant "RavenDB Documentation —" prefix from frontmatter title since the Docusaurus site title suffix already provides brand context.

scripts/split-sitemap.js (new)
Post-build script that:

  • Reads the Docusaurus-generated sitemap.xml
  • Groups URLs by section (cloud, guides, versioned docs, misc)
  • Creates individual sub-sitemap files per section
  • Replaces sitemap.xml with a standard <sitemapindex>
  • Excludes legacy versions below 6.0 as a safety net
  • Gracefully skips if no sitemap.xml or no URLs found

package.json
Chain node scripts/split-sitemap.js after docusaurus build in both build and build:current scripts.

Build output example

sitemap-cloud.xml:      24 URLs
sitemap-docs-7.2.xml:  693 URLs
sitemap-guides.xml:    105 URLs
sitemap-misc.xml:        1 URL
────────────────────────────────
Total:                 823 URLs across 4 sub-sitemaps

When building all versions, each version >= 6.0 gets its own sitemap-docs-{version}.xml.

Type of change

  • Content - docs
  • Content - cloud
  • Content - guides
  • Content - start pages/other
  • New docs feature (consider updating /templates or readme)
  • Bug fix
  • Optimization
  • Other

Changes in docs URLs

  • No changes in docs URLs
  • Articles are restructured, URLs will change, mapping is required (update /scripts/redirects.json file, set Documents Moved PR label)

Changes in UX/UI

  • No changes in UX/UI
  • Changes in UX/UI (include screenshots and description)

Remove "RavenDB Documentation" prefix from homepage frontmatter title
to prevent duplication with the site-wide title suffix, changing the
rendered title from "RavenDB Documentation — ... | RavenDB Documentation"
to "Guides, API Reference & Tutorials | RavenDB Documentation".
Replace the single flat sitemap.xml (800+ URLs) with a sitemap index
that references per-section sub-sitemaps: docs (per version), cloud,
guides, and misc. Legacy versions below 6.0 are excluded.

Runs automatically after `npm run build` and `npm run build:current`.
@poissoncorp poissoncorp requested a review from Lwiel April 2, 2026 08:32
parseFloat("7.11") < parseFloat("7.2") would incorrectly exclude
version 7.11. Compare major and minor parts as separate integers.
@ppekrol ppekrol merged commit 9aeef89 into ravendb:main Apr 2, 2026
1 check 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.

3 participants