bearomorphism commented on PR #1305: URL: https://github.com/apache/mahout/pull/1305#issuecomment-4414721141
Thanks for the review @viiccwen — building locally surfaced two real defects plus a deeper root cause that I missed in the original PR. Force-pushed `9c9e29f27` addressing both points (and a bit more). ## Root cause The `../community/mailing-lists` and `../community/pr-policy-and-review-guidelines` 404s are not unique to this PR — they're a latent bug from #948 (`5901b9ab1`, *docs: use relative links in docs*). Two interacting causes: 1. `website/docusaurus.config.ts` doesn't set `trailingSlash`. Docusaurus defaults to `true`, so URLs end with `/`. Browser resolution of `../community/mailing-lists` from `/docs/next/about/how-to-contribute/` lands at `/docs/next/about/community/mailing-lists` (404) — exactly what you reported. 2. The proper Docusaurus fix is to write `[label](../community/mailing-lists.md)` so Docusaurus does version-aware static resolution. But `website/scripts/sync-docs.js` was stripping the `.md` extension before Docusaurus saw the file (`transformLinks()`), defeating that resolution. ## Changes in `9c9e29f27` | File | Change | |---|---| | `website/scripts/sync-docs.js` | Stop stripping `.md` from internal links so Docusaurus can resolve them | | `docs/about/how-to-contribute.md` | `../community/...` → `../community/....md` on lines 15, 85, 144; drop `[2]` `website/README.md` link (see below) | | `docs/qumat/index.md` | Same fix on lines 24, 25, 26 (`../qdp`, `../learning/...`) — pre-existing same-pattern bug | | `docs/qumat/getting-started.md` | Same fix on line 75 | | `website/versioned_docs/version-0.4/about/how-to-contribute.md` | **Issue 2:** replace `http://people.apache.org/~hossman/#private_q` (404) with `https://www.apache.org/theapacheway/` (matches `next`/v0.5); drop `[2]` link | | `website/versioned_docs/version-0.5/about/how-to-contribute.md` | Drop `[2]` link | The `[2] guide for making website updates` link previously repointed to `website/README.md`. After verification, that file is never published to `mahout.apache.org` (it lives outside `/docs/` and isn't in the sidebar — sync script only ingests `/docs/`). #1301 explicitly allows removal when no equivalent page exists, so the sentence is dropped on all 3 versioned routes — same treatment as the `books-and-slides` line. ## Verification - `cd website && npm run build`: succeeds, **no broken-link warnings** on the previously broken paths. Inspecting the rendered HTML, `/docs/next/about/how-to-contribute` now contains: - `href="/docs/next/community/mailing-lists"` ✓ - `href="/docs/next/community/pr-policy-and-review-guidelines"` ✓ - `lychee 0.24.2 --config lychee.toml .`: `95 → 94` total errors (removed v0.4 hossman 404; no new failures). - `pre-commit` (`end-of-file-fixer`, `trailing-whitespace`): pass. ## Known out-of-scope The full lychee sweep still surfaces ~94 pre-existing errors elsewhere in the repo — root-relative `/docs/...` paths in `v0.4/download/quickstart`, missing KaTeX font files, etc. They predate this PR and aren't related to #1301; happy to file a follow-up issue if helpful. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
