From 89f4b6b9a29c642987146f2b433bc8ba011b4380 Mon Sep 17 00:00:00 2001 From: Florian Date: Sun, 1 Nov 2026 16:32:37 +0000 Subject: [PATCH] ci(links): resolve Docusaurus root-relative links in lychee The weekly link check reported 36 "Cannot resolve root-relative link" errors for docs pages that link to /img/... static assets and /
/ doc routes. Docusaurus resolves both (and its build already throws on broken internal links), but lychee had no root dir. Point --root-dir at docs/static and remap doc-section routes to docs/docs/
/ with md/mdx fallback extensions, so lychee now verifies those targets exist rather than erroring. Also ignore the four OTP GraphQL endpoints in the schema NOTICE: they accept POST queries only, so GET returns 405/500 by design. Refs #247 Claude-Session: https://claude.ai/code/session_017DEL8C49cYr4sPqU7EJgCR --- .github/workflows/links.yml | 7 +++++++ .lycheeignore | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index d0f4fc83f..eb8d1191b 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -25,9 +25,16 @@ jobs: with: # Markdown across the repo; node_modules and other gitignored paths are # skipped automatically. Tune ignored URLs in .lycheeignore. + # Docusaurus serves root-relative links: /img/... from docs/static and + # /
/ from docs/docs/
/.md(x). Resolve both + # so lychee checks those targets exist instead of reporting them as + # unresolvable. args: >- --no-progress --cache --max-cache-age 1d --exclude-path infra/docker/data + --root-dir ${{ github.workspace }}/docs/static + --remap 'file://${{ github.workspace }}/docs/static/(administration|developer|features|guides|install|overview|releases)/(.+) file://${{ github.workspace }}/docs/docs/$1/$2' + --fallback-extensions md,mdx './**/*.md' './**/*.mdx' fail: false # don't fail the run; we report via an issue instead - name: Find existing broken-links issue diff --git a/.lycheeignore b/.lycheeignore index 07560a57f..5d8550e14 100644 --- a/.lycheeignore +++ b/.lycheeignore @@ -14,3 +14,9 @@ # npm package page returns 403 to lychee although the documentation link is valid. ^https://www\.npmjs\.com/package/@openmapx/extension-sdk$ + +# OTP GraphQL API endpoints accept POST queries only; a plain GET returns 405/500. +^https://api\.stadtnavi\.de/otp/gtfs/v1$ +^https://api\.peatus\.ee/routing/v1/routers/estonia/index/graphql$ +^https://mapi\.5t\.torino\.it/routing/v1/routers/mat/index/graphql$ +^https://otp281\.trufi\.app/otp/transmodel/v3$