Skip to content

Fix/docusaurus build warnings - #392

Open
gerbsen wants to merge 8 commits into
mainfrom
fix/docusaurus-build-warnings
Open

gerbsen wants to merge 8 commits into
mainfrom
fix/docusaurus-build-warnings

Conversation

@gerbsen

@gerbsen gerbsen commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

I was a little annoyed by all the warnings once you start the server, so I thought it might be a good idea to get rid of them. There were quite a lot of links which I manually resolved to new pages due to the osism removal and archival of the health-monitor repo. I also bumped the version of Docusaurus to the most recent one: works on my machinel™.

One thing I would like to change in the future: brokens links are considered a real problem and break the complete build process. I think if we already have the possibility to check that all links work, then we should use it.

@gerbsen
gerbsen force-pushed the fix/docusaurus-build-warnings branch from 89f80fb to 4a1a09c Compare August 5, 2026 14:23
Daniel Gerber and others added 2 commits August 7, 2026 11:55
Running `npm start` emitted three classes of warning that we control:

- `siteConfig.onBrokenMarkdownLinks` is deprecated and removed in
  Docusaurus v4. Moved it to `siteConfig.markdown.hooks.onBrokenMarkdownLinks`,
  keeping the `warn` severity so broken markdown links are still reported.

- All seven blog posts lacked a truncation marker, so the blog list pages
  rendered each post in full. Added `<!-- truncate -->` after the opening
  paragraph of each post.

- Duplicate route at `/standards/`: the vendored standards content pulled in
  by getDocs.js ships a README.md, which Docusaurus renders at the same route
  as our own standards/index.md. The standards docs plugin now excludes that
  README so index.md is unambiguously the page at `/standards/`.

The remaining seven "Markdown link ... couldn't be resolved" warnings all
originate in gitignored content vendored from upstream repositories, so they
have to be fixed in those repositories rather than here.

Committed with --no-verify: the pre-commit hook runs `markdownlint-cli2-fix`,
a binary that markdownlint-cli2 v0.22 no longer ships. `prettier --check` and
`markdownlint-cli2` were both run manually against these changes and pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Daniel Gerber <394442-gerbsen@users.noreply.gitlab.com>
Signed-off-by: Daniel Gerber <394442-gerbsen@users.noreply.gitlab.com>
@gerbsen
gerbsen force-pushed the fix/docusaurus-build-warnings branch from 4a1a09c to c04d33c Compare August 7, 2026 09:57
Comment thread docs.package.json Resolved
- Add User-Agent header for lwn.net in mlc_config.json to avoid 401
  responses from the markdown link checker
- Add scs-health-monitor docs to docs.package.json so referenced files
  are fetched during the build

Signed-off-by: Daniel Gerber <394442-gerbsen@users.noreply.gitlab.com>
@gerbsen
gerbsen force-pushed the fix/docusaurus-build-warnings branch from 7f92afb to aaa4c45 Compare August 7, 2026 14:25
Comment thread docusaurus.config.js
// own standards/index.md. Skip it; index.md is the page we want there.
// Repeats Docusaurus' default excludes, which this option replaces.
exclude: [
'README.md',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this not necessary before?

Or is this a preliminary step before we alter getDocs.js to not delete README.md?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The npm start said very explicitly:

[WARNING] Duplicate routes found!
- Attempting to create page at /standards/, but a page already exists at this route.
This could lead to non-deterministic routing behavior.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get this error with "main".

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this question resolved? Should we deploy to staging once more for comparison?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please give me some time to reevaluate this, might be resolved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I rebased this and removed the scs-health-monitor (which is archived). I now get this for npm run build && npm run serve. So I have to fix all of these warnings. Why does this not break the current build @garloff ?

[WARNING] @docusaurus/plugin-client-redirects: some redirects would override existing paths, and will be ignored:
- {"from":"/standards/scs-compatible-iaas","to":"/standards/scopes/scs-0501"}
- {"from":"/standards/scs-compatible-kaas","to":"/standards/scopes/scs-0502"}
[WARNING] Docusaurus found broken links!

Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist.
Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass.

Exhaustive list of all broken links found:
- Broken link on source page path = /docs/:
   -> linking to /docs/operating-scs/components/scs-health-monitor/overview
   -> linking to /docs/container/components/cluster-stacks/providers/openstack/quickstart
- Broken link on source page path = /docs/faq/:
   -> linking to /community/governance/project-board
- Broken link on source page path = /user-docs/application-examples/opendesk-on-scs/getting_started:
   -> linking to helper/deploy-openDesk (resolved as: /user-docs/application-examples/opendesk-on-scs/helper/deploy-openDesk)

[WARNING] Docusaurus found broken anchors!

Please check the pages of your site in the list below, and make sure you don't reference any anchor that does not exist.
Note: it's possible to ignore broken anchors with the 'onBrokenAnchors' Docusaurus configuration, and let the build pass.

Exhaustive list of all broken anchors found:
- Broken anchor on source page path = /docs/container/components/container-registry/docs/migration:
   -> linking to /docs/container/components/container-registry/docs/backup_and_restore#backup-and-restore
- Broken anchor on source page path = /docs/releases/Release1:
   -> linking to #Known-Issue-with-OIDC-Logout (resolved as: /docs/releases/Release1#Known-Issue-with-OIDC-Logout)
   -> linking to #non-TLS-restrictions-testbed (resolved as: /docs/releases/Release1#non-TLS-restrictions-testbed)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the checkout is not clean. What do you get from git status?

@mbuechse

mbuechse commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

See https://docs-staging.scs.community/blog/

Blog posts are now truncated in the listing. I think this is an improvement. However, it's a change, so let's ask @garloff and @fkr whether it's okay.

@gerbsen

gerbsen commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

I'm also in the camp "improvement".

@depressiveRobot

Copy link
Copy Markdown
Contributor

+1 for truncating, because currently it feels like an endless wall to scroll especially on mobile.

@depressiveRobot

Copy link
Copy Markdown
Contributor

I still get these 3 warnings:

[WARNING] Markdown link with URL `Rationale.md` in source file "docs/04-operating-scs/components/scs-health-monitor/overview.md" (9:5) couldn't be resolved.
Make sure it references a local Markdown file that exists within the current plugin.
[WARNING] Markdown link with URL `docs/Metric_List.md` in source file "docs/04-operating-scs/components/scs-health-monitor/overview.md" (89:60) couldn't be resolved.
Make sure it references a local Markdown file that exists within the current plugin.
[WARNING] Markdown link with URL `./ObservabilityStack/SetupObservabilityStack.md` in source file "docs/04-operating-scs/components/scs-health-monitor/overview.md" (95:1) couldn't be resolved.
Make sure it references a local Markdown file that exists within the current plugin.

@garloff

garloff commented Nov 2, 2026

Copy link
Copy Markdown
Member

I like what this patch is doing!
@mbuechse - is there something that still needs to be discussed and clarified?
Otherwise, I would resolve the conflicts and merge ...

Signed-off-by: Kurt Garloff <kurt@garloff.de>
@garloff

garloff commented Nov 2, 2026

Copy link
Copy Markdown
Member

This requires #408 to pass CI.

@garloff

garloff commented Nov 2, 2026

Copy link
Copy Markdown
Member

While being at it, I'd like to request your support for #406 (use newer GH actions that are meant to be used with node24) and #407 (update to docusaurus 3.10.2, hopefully unlocking dependabot fixes for critical issues).

@mbuechse

mbuechse commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@garloff There is still one unresolved discussion. The proverbial ball is in @gerbsen's field -- I don't think my question has been answered in a satisfactory way, given that @depressiveRobot was not able to reproduce the error that was talked about there.

@mbuechse

mbuechse commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

I still get these 3 warnings:

I don't know if this is still the case, but I don't think we need to address ALL the warnings with this PR. Reducing the number significantly would be a win already.

@garloff

garloff commented Nov 9, 2026

Copy link
Copy Markdown
Member

Should we just back out the README.md exclusion and then merge and allow for @gerbsen to open another separate PR where that can be discussed?

@gerbsen gerbsen mentioned this pull request Nov 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants