mirror of
https://github.com/lancedb/lancedb.git
synced 2026-12-04 00:05:19 +00:00
docs: fail docs build on warnings (#3707)
## Summary - run the existing MkDocs deployment build in strict mode - turn documentation warnings, including unresolved references, into CI failures instead of deploying them ## Why The docs workflow currently completes when MkDocs emits warnings. Using MkDocs' built-in strict mode makes the deployment stop on those warnings and surfaces documentation problems immediately. This addresses the warning-detection portion of #572 without adding another dependency or duplicating the docs build. ## Validation - `git diff --check` - parsed `.github/workflows/docs.yml` with PyYAML - full `mkdocs build --strict` was not run locally because MkDocs is not installed; the existing docs workflow has the required dependencies --------- Co-authored-by: Will Jones <willjones127@gmail.com> Co-authored-by: Xuanwo <github@xuanwo.io>
This commit is contained in:
co-authored by
Will Jones
Xuanwo
parent
a0ff67e13e
commit
193c9d8e2e
@@ -59,6 +59,12 @@ function processContents(contents) {
|
||||
});
|
||||
return lines.join("\n") + "\n\n";
|
||||
})
|
||||
// Escape array suffixes that MkDocs could read as reference links.
|
||||
// Preserve the contents of fenced blocks and inline code spans.
|
||||
.replace(
|
||||
/^(`{3,})[^\n]*\n[\s\S]*?^\1[ \t]*$|(`+).*?\2|(?<=\])\[\]/gm,
|
||||
(match) => (match === "[]" ? "[]" : match),
|
||||
)
|
||||
// Also trim trailing whitespace
|
||||
.replace(/([^ \t])[ \t]+\n/g, "$1\n")
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user