Repository navigation
docs: Add checks for broken links on each branch; Fix currently broken links - #26335
antobinary merged 3 commits into
Conversation
`docusaurus build` reports 11 broken anchors on this branch. Docusaurus only warns about them (onBrokenAnchors defaults to 'warn'), so they reach the site unnoticed and the links open at the top of the target page. - The API headings render as "`GET` `POST` create" and so on, so their ids are get-post-create, get-post-end, post-insertdocument and get-getrecordings. Links to #create, #end, #insertdocument and #getrecordings, in customize.md, recording.md, faq.md and api.md, now use those ids. - plugins.md: heading ids are lower case (#running-the-plugin-from-source), the auxiliary functions are under #auxiliaries, and there is no "Plugin Versioning" section; "SDK version compatibility" explains how the server's html5PluginSdkVersion is matched. - release-testing.md pointed at a new-features section that is not on the 4.0 page; preUploadedPresentationOverrideDefault is documented with the create call.
onBrokenLinks was the only check that failed the build. Set onBrokenAnchors and onDuplicateRoutes to 'throw', and move onBrokenMarkdownLinks into markdown.hooks as 'throw', next to onBrokenMarkdownImages: the top-level option is deprecated and printed a warning on every build. This config applies when this branch's docs are built on their own, locally or in the docs build check. The docs.bigbluebutton.org deploy builds every version with the config on develop, where anchors stay at 'warn' because the archived versions link into the current one. With the anchor fixes in the previous commit the branch builds with no warnings.
No pull request workflow builds the docs: automated-tests.yml ignores docs/** and **/*.md, and deploy-docs.yml only runs on pushes to develop. The broken link from bigbluebutton#25912 was found only after it reached v4.0.x-release and the docs deploy failed. The new workflow runs `npm run build` in docs/ on pull requests that touch docs/ or the workflow, and on demand. With the stricter config it fails on broken links, anchors, markdown links and images, and duplicate routes. It builds this branch's docs alone, without the other versions, so the archived branches cannot fail it. Node 24 and the action versions match deploy-docs.yml on develop.
|
No actionable comments were generated in the recent review.
|
⏳ Automated tests are running... |
47eec9e
into
bigbluebutton:v4.0.x-develop
4.0.2 makes the docs build fail on a broken link or anchor (#26335: onBrokenAnchors, onBrokenMarkdownLinks and onBrokenMarkdownImages set to throw). On the merged tree it stops at three anchors: - administration/customize: the upgrade steps link to install#upgrading-bigbluebutton-40. The 4.1 install page names that section "Upgrading BigBlueButton 4.1". The link predates the merge and only warned before. - administration/customize: the LiveKit dial-in note from 4.0.2 (#26409) links to the Media section of new-features, and administration/privacy: the on-device live captions paragraph from 4.0.2 (#26334) links to "Live captions transcribed on the user's device" there. Both sections are on the 4.0 page. The 4.1 page lists only what is new in 4.1. Point the first at #upgrading-bigbluebutton-41. Point the other two at the 4.0 page, the way the 4.1 new-features page already does (https://docs.bigbluebutton.org/4.0/new-features/). Both anchors exist on the published 4.0 page.
What
docs/fail on broken anchors, broken markdown links and images, and duplicate routes, not only on broken links. The deprecated top-levelonBrokenMarkdownLinksmoves tomarkdown.hooks, which also removes the deprecation warning from every build.npm run buildindocs/on pull requests that changedocs/or the workflow, and on demand.Why
No pull request workflow builds the docs.
automated-tests.ymlignoresdocs/**and**/*.md, anddeploy-docs.ymlonly runs on pushes todevelop. The broken link from #25912 was found only after it reachedv4.0.x-releaseand the docs deploy failed (fixed in #26321).Broken anchors were only warnings, so 11 built up on this branch. Each one opens the target page at the top instead of at the section.
Anchor fixes
The API headings render as
### `GET` `POST` create, so their ids include the HTTP methods.administration/customize.md,development/recording.md,support/faq.md/development/api#create,#end,#getrecordings#get-post-create,#get-post-end,#get-getrecordingsdevelopment/api.md#insertdocument#post-insertdocumentplugins.md#running-the-Plugin-from-Source#running-the-plugin-from-sourceplugins.md#auxiliary-functions#auxiliariesplugins.md[Plugin Versioning](#plugin-versioning), no such section[SDK version compatibility](#sdk-version-compatibility)testing/release-testing.md/new-features/#override-default-presentation-on-create-via-url, not on the 4.0 page/development/api#get-post-create, wherepreUploadedPresentationOverrideDefaultis documentedScope
develop, which this PR does not change. There, anchors stay atwarn, because pages of archived versions link into the current version (companion PR ondevelop). This branch's config applies when its docs are built on their own: locally and in the new check.v3.0.x-develop.v4.1.x-developbrings the stricter config and the check along, and that merge PR runs the check. Broken anchors that exist only on 4.1 have to be fixed there, for examplecustomize.mdlinking to/administration/install#upgrading-bigbluebutton-40. In a trial merge, the 5 docs files that conflict are the same 5 that conflict with plainv4.0.x-develop.How to test
cd docs && npm ci && npm run buildfinishes with no broken-link or broken-anchor warnings. Putting back one broken anchor, for example#auxiliary-functionsinplugins.md, makes the build fail with "Docusaurus found broken anchors!".