Skip to content
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

Closed
adamdicarlo0 opened this issue Mar 6, 2024 · 4 comments
Closed

Broken link on docs site home page #20648

adamdicarlo0 opened this issue Mar 6, 2024 · 4 comments
Labels

Comments

@adamdicarlo0
Copy link

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

image

@benjyw
Copy link
Contributor

benjyw commented Mar 7, 2024

@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

@benjyw
Copy link
Contributor

benjyw commented Mar 7, 2024

Thanks for the report @adamdicarlo0 !

@huonw
Copy link
Contributor

huonw commented Mar 7, 2024

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).

huonw added a commit to pantsbuild/pantsbuild.org that referenced this issue Mar 8, 2024
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
@huonw
Copy link
Contributor

huonw commented Mar 10, 2024

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!

@huonw huonw closed this as completed Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants