From f6211b8fe60ae37e6cc88403d09c3f074d7368b7 Mon Sep 17 00:00:00 2001 From: Ramon Roche Date: Mon, 12 Oct 2026 18:06:03 +0200 Subject: [PATCH] chore(site): serve the site at mavlink-m.dronecode.org Pages now serves the site at the root of mavlink-m.dronecode.org, and dronecode.github.io/mavlink-military/ redirects there. The site is still built for the /mavlink-military/ base, so every stylesheet and script it loads returns 404 and the pages render unstyled, and the sitemap lists the old address, which fails the deploy job's site check. Build for the root of the new domain, and point the README, the check defaults and the script example at it. No wire effect: only the documentation site changes. Validation: built with the docs workflow's environment, the site check passes, all 13 sitemap URLs start with https://mavlink-m.dronecode.org/, and served at the root, all 34 assets the main pages load return 200. The deployed-site check passes against a root-served build; against the live site it fails on the old sitemap. Assisted-by: Claude-Code:claude-opus-5-5 Signed-off-by: Ramon Roche --- .github/scripts/docs/check_deployed_site.sh | 2 +- .github/workflows/docs.yml | 11 ++++++----- README.md | 2 +- docs/.vitepress/config.mjs | 7 +++---- docs/scripts/check_site.py | 2 +- docs/scripts/tests/test_check_site.py | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/scripts/docs/check_deployed_site.sh b/.github/scripts/docs/check_deployed_site.sh index 2f5c6ef..5ab37d6 100755 --- a/.github/scripts/docs/check_deployed_site.sh +++ b/.github/scripts/docs/check_deployed_site.sh @@ -3,7 +3,7 @@ # and the sitemap's first URL lies under the site and loads too. # # Usage: check_deployed_site.sh -# site the site's address, e.g. https://dronecode.github.io/mavlink-military/ +# site the site's address, e.g. https://mavlink-m.dronecode.org/ # # Environment: CHECK_RETRIES (default 5) and CHECK_RETRY_DELAY in seconds # (default 10) set how often curl retries each request, since the CDN can lag diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index bfc1363..db6b449 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,11 +30,12 @@ permissions: contents: read env: - # Project Pages URL until the custom domain is live. When it is: add - # docs/public/CNAME, set the domain in Settings > Pages, remove DOCS_BASE, - # and point DOCS_HOSTNAME at the new domain. - DOCS_BASE: /mavlink-military/ - DOCS_HOSTNAME: https://dronecode.github.io/mavlink-military + # Served at the root of the custom domain set in Settings > Pages; an + # Actions deploy ignores a CNAME file. A fork served from + # https://.github.io// sets DOCS_BASE to // and + # DOCS_HOSTNAME to that address. + DOCS_BASE: / + DOCS_HOSTNAME: https://mavlink-m.dronecode.org jobs: build: diff --git a/README.md b/README.md index 1f00e13..4304d8d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MAVLink-M -**Documentation and message reference: https://dronecode.github.io/mavlink-military/** +**Documentation and message reference: https://mavlink-m.dronecode.org/** MAVLink-M is an open dialect of [MAVLink 2](https://mavlink.io) for coordination and situational-awareness messaging between uncrewed platforms and diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index e685d6e..5621523 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -1,13 +1,12 @@ import { defineConfig } from "vitepress"; import { sidebar } from "./get_sidebar.js"; -// Served from https://dronecode.github.io/mavlink-military/ until the project -// domain is live. CI sets DOCS_BASE and DOCS_HOSTNAME; once the custom domain -// is configured, drop DOCS_BASE (defaults to "/") and point DOCS_HOSTNAME at it. +// Served at the root of https://mavlink-m.dronecode.org/. CI sets DOCS_BASE and +// DOCS_HOSTNAME (docs.yml); the defaults build for the same place. const base = process.env.DOCS_BASE || "/"; // The sitemap resolves each page against the hostname, which drops the last // path segment unless the hostname ends in a slash. -const hostname = (process.env.DOCS_HOSTNAME || "https://dronecode.github.io/mavlink-military").replace(/\/?$/, "/"); +const hostname = (process.env.DOCS_HOSTNAME || "https://mavlink-m.dronecode.org").replace(/\/?$/, "/"); const repo = "https://github.com/Dronecode/mavlink-military"; export default defineConfig({ diff --git a/docs/scripts/check_site.py b/docs/scripts/check_site.py index d7a4e64..32ea03b 100644 --- a/docs/scripts/check_site.py +++ b/docs/scripts/check_site.py @@ -73,7 +73,7 @@ def main(argv: list[str]) -> int: dist = Path(argv[1]) if len(argv) > 1 else DIST base = slash("/" + os.environ.get("DOCS_BASE", "/").strip("/")) hostname = slash( - os.environ.get("DOCS_HOSTNAME", "https://dronecode.github.io/mavlink-military") + os.environ.get("DOCS_HOSTNAME", "https://mavlink-m.dronecode.org") ) if not (dist / "index.html").is_file(): print(f"ERROR: no built site in {dist}; run npm run docs:build first", file=sys.stderr) diff --git a/docs/scripts/tests/test_check_site.py b/docs/scripts/tests/test_check_site.py index 3498bf5..9a58cc3 100644 --- a/docs/scripts/tests/test_check_site.py +++ b/docs/scripts/tests/test_check_site.py @@ -185,9 +185,9 @@ def test_site_at_the_root_of_a_domain(self) -> None: self.assertEqual(status, 0, out) def test_defaults_match_the_vitepress_config(self) -> None: - # Without the variables, config.mjs builds for "/" on the Pages hostname. + # Without the variables, config.mjs builds for "/" on the project domain. self.write("index.html", page('Docs')) - self.sitemap("en/", host="https://dronecode.github.io/mavlink-military") + self.sitemap("en/", host="https://mavlink-m.dronecode.org") status, out, _ = self.check({"DOCS_BASE": None, "DOCS_HOSTNAME": None}) self.assertEqual(status, 0, out)