hack: resolve links in the markdown output

Resolves internal links to point to the corresponding (rendered) path
rather than keeping them as internal links, which wouldn't make sense to
an agent/llm reading them.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson
2026-01-23 12:43:37 +01:00
parent bd9a74141c
commit d0128a8c82
4 changed files with 238 additions and 24 deletions

View File

@@ -51,7 +51,7 @@ ARG DOCS_URL="https://docs.docker.com"
ENV HUGO_CACHEDIR="/tmp/hugo_cache"
RUN --mount=type=cache,target=/tmp/hugo_cache \
hugo --gc --minify -e $HUGO_ENV -b $DOCS_URL
RUN ./hack/flatten-markdown.sh public
RUN ./hack/flatten-and-resolve.js public
# lint lints markdown files
FROM ghcr.io/igorshubovych/markdownlint-cli:v0.45.0 AS lint