diff --git a/.github/workflows/docs-integrity.yml b/.github/workflows/docs-integrity.yml index cc228ac..9c0d80a 100644 --- a/.github/workflows/docs-integrity.yml +++ b/.github/workflows/docs-integrity.yml @@ -66,6 +66,18 @@ jobs: - name: Discoverability surfaces are published run: uv run python scripts/seo_check.py + - name: Mike-style versioned site_url is slash-safe + # mike rewrites site_url to a version path without a trailing slash. Reproduce + # that exact input so concatenation bugs cannot hide behind the normal config. + run: | + cp mkdocs.yml .mkdocs-versioned.yml + trap 'rm -f .mkdocs-versioned.yml; rm -rf site-versioned' EXIT + sed -i 's|^site_url:.*|site_url: https://mskazemi.com/aobench/latest|' .mkdocs-versioned.yml + uv run mkdocs build --strict -f .mkdocs-versioned.yml --site-dir site-versioned + uv run python scripts/seo_check.py \ + --site-dir site-versioned \ + --base-url https://mskazemi.com/aobench/latest/ + - name: Examples still run run: uv run python -m pytest tests/test_examples.py -q diff --git a/CHANGELOG.md b/CHANGELOG.md index 608c47f..e5dd607 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ ## Unreleased +### Fixed — versioned documentation URLs no longer lose the path separator + +- Normalize mike's slashless versioned `site_url` before appending paths in the theme + override. The `llms.txt` alternate, Twitter preview image, changelog banner link, and + breadcrumb ancestor URLs now resolve under `/aobench/latest/` instead of malformed + paths such as `/aobench/latestllms.txt`. +- Exclude `docs/overrides/**` from published documentation so raw Jinja source is not + exposed as a public page. +- Extend the SEO gate with a no-trailing-slash versioned build and site-wide assertions + for these URLs, including breadcrumb resolution and the override-source leak. + ### Fixed — structured data now matches Google's breadcrumb and Dataset requirements - Breadcrumb JSON-LD now emits only real navigable ancestors, gives every emitted diff --git a/docs/overrides/main.html b/docs/overrides/main.html index 77baf01..e77d624 100644 --- a/docs/overrides/main.html +++ b/docs/overrides/main.html @@ -17,6 +17,7 @@ {% block extrahead %} {%- set page_title = (page.meta and page.meta.title) or page.title or config.site_name -%} {%- set page_desc = (page.meta and page.meta.description) or config.site_description -%} + {%- set site_base = config.site_url.rstrip('/') ~ '/' -%} @@ -26,7 +27,7 @@ - + {%- if page.meta and page.meta.keywords %} @@ -44,7 +45,7 @@ - +