Skip to content

chore(site): give sitemap URLs the site's base path - #14

Merged
mrpollo merged 1 commit into
mainfrom
fix/docs-sitemap-urls
Oct 2, 2026
Merged

mrpollo merged 1 commit into
mainfrom
fix/docs-sitemap-urls

Conversation

@TSC21

@TSC21 TSC21 commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Every URL in the published sitemap is missing the /mavlink-military/ part of the address, so all of them return 404. This fixes the sitemap.

The cause is in docs/.vitepress/config.mjs: it gives the sitemap a hostname without a trailing slash, and resolving a page against that drops the last path segment, so en/about/scope.html turns into https://dronecode.github.io/en/about/scope.html. The config always gives the hostname its trailing slash, so the custom domain planned for later can't bring the problem back.

Tested by building with the docs workflow's settings: all 13 sitemap URLs start with https://dronecode.github.io/mavlink-military/ and each names a page in the build, and a build with no base path and another host gives URLs on that host. There is no change to the dialect or the generated headers. #11 adds a CI check for this, which fails until this is merged.

Assisted-by: Claude-Code:claude-opus-5-5


RIIS


@TSC21 TSC21 changed the title fix(docs): point the sitemap at the site's real pages fix(docs): give sitemap URLs the site's base path Oct 2, 2026
@TSC21
TSC21 force-pushed the fix/docs-sitemap-urls branch from 3fdefc2 to 85b6184 Compare October 2, 2026 13:32
@TSC21
TSC21 requested a review from mrpollo October 2, 2026 14:07
@TSC21
TSC21 force-pushed the fix/docs-sitemap-urls branch from 85b6184 to 036f8ad Compare October 2, 2026 14:07
Every URL in the published sitemap leaves out /mavlink-military/, the
path the site is served under, so each one returns 404 and search
engines find no page that exists. config.mjs passes the sitemap a
hostname without a trailing slash, and the sitemap resolves each page
against it, which drops the last path segment: en/about/scope.html
becomes https://dronecode.github.io/en/about/scope.html.

The hostname gets its trailing slash in config.mjs, whatever
DOCS_HOSTNAME holds, so the custom domain the config comment plans for
can't bring the problem back.

Validation: built with the docs workflow's environment, all 13
sitemap URLs start with https://dronecode.github.io/mavlink-military/
and name a page in the build; on main all 13 start with
https://dronecode.github.io/en/. Built with no base path and another
host, the URLs follow that host.

Assisted-by: Claude-Code:claude-opus-5-5
Signed-off-by: TSC21 <nmarques@riis.com>
@TSC21
TSC21 force-pushed the fix/docs-sitemap-urls branch from 036f8ad to bf0eadb Compare October 2, 2026 16:20
@TSC21 TSC21 changed the title fix(docs): give sitemap URLs the site's base path chore(site): give sitemap URLs the site's base path Oct 2, 2026
@mrpollo
mrpollo merged commit 26dd255 into main Oct 2, 2026
5 of 6 checks 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.

2 participants