Skip to content

feat: add antora docs to sitemap.xml#54

Merged
wmat merged 1 commit into
riscv:mainfrom
JatsuAkaYashvant:antora-to-sitemap
Mar 9, 2026
Merged

feat: add antora docs to sitemap.xml#54
wmat merged 1 commit into
riscv:mainfrom
JatsuAkaYashvant:antora-to-sitemap

Conversation

@JatsuAkaYashvant
Copy link
Copy Markdown
Contributor

Fixes #18

Problem

The Antora-generated reference manuals under /docs/reference are served as static HTML files but are not included in the Docusaurus-generated sitemap.xml.

Because the sitemap plugin only includes routes known to Docusaurus, the Antora reference pages are currently missing from the sitemap. This prevents search engines from easily discovering and indexing these pages, which negatively impacts SEO.

Solution

This PR adds a post-build step that scans the Antora build output and appends the generated HTML routes under /docs/reference to the sitemap.

This ensures that Antora-generated documentation pages are included alongside Docusaurus routes in sitemap.xml.

Implementation

The following changes were made to include Antora-generated pages in the sitemap:

  1. Enable sitemap generation

    Sitemap generation was enabled in docusaurus.config.ts so that Docusaurus produces build/sitemap.xml during the build process.

  2. Add a postbuild script that scans the Antora build directory:

      scripts/add-antora-to-sitemap.js
    

The script:

  • Recursively scans antora/build/docs/reference

  • Converts discovered .html files to routes

  • Appends them to build/sitemap.xml

@wmat
Copy link
Copy Markdown
Collaborator

wmat commented Mar 9, 2026

Thanks. Note that this isn't a live project at present. I'll merge this change but I'd recommend not working on this for now. Thanks.

@wmat wmat merged commit cfbcdf8 into riscv:main Mar 9, 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.

add antora docs to sitemap.xml

2 participants