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)