-
-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken link on docs site home page #20648
Comments
@thejcannon what is the right way to link to "latest version of a versioned page" from a non-versioned page? https://www.pantsbuild.org/docs/introduction/welcome-to-pants is broken, but https://www.pantsbuild.org/2.19/docs/introduction/welcome-to-pants works |
Thanks for the report @adamdicarlo0 ! |
We have one page that computes a dynamic link using the latest version: https://github.com/pantsbuild/pantsbuild.org/blob/ac1d7051581bf4be77abd95b0405aa97202e6aad/src/pages/community/members.mdx#L28 import { default as versions } from "@site/versions.json";
import Link from "@docusaurus/Link";
... <Link to={`/${versions[0]}/docs/contributions`}>helpful guide</Link>. Although that links to the latest non-dev version (which could be an RC pre-release) not the latest stable version, so we may want to find a better way to do it (and wrap it up in a component? https://docusaurus.io/docs/markdown-features/react). |
This papers over the dead "Learn more" link on the pantsbuild.org front page (pantsbuild/pants#20648) by replacing it with the hard-coded `/2.19/docs/introduction/welcome-to-pants`, for the current latest-stable version. This isn't a full solution: preferably this would be a "dynamic" link, pointing to the latest stable version. Thus this doesn't close that issue. The dynamic approach we take in some other pages isn't perfect because it isn't to the latest _stable_ release, but can include pre-releases (it [currently](https://www.pantsbuild.org/community/members#how-can-i-contribute-to-pants) points to `/2.20/...`, which is probably reasonable for a contributing guide, but less so for a "getting started" one): https://github.com/pantsbuild/pantsbuild.org/blob/ac1d7051581bf4be77abd95b0405aa97202e6aad/src/pages/community/members.mdx#L28
In pantsbuild/pantsbuild.org#171 we fixed the short-term issue by making the link hard-coded to a particular version (2.19), I've filed pantsbuild/pantsbuild.org#174 for the longer-term issue of keeping it up to date once 2.20 etc. are released. Calling this one done, thanks @adamdicarlo0! |
Describe the bug
"Learn more" on home page links to https://www.pantsbuild.org/docs/introduction/welcome-to-pants, which is a 404.
Additional info
The text was updated successfully, but these errors were encountered: