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

Have Docs/Reference sidebars reference each other #23

Merged
merged 5 commits into from
Jan 2, 2024

Conversation

thejcannon
Copy link
Member

Fixes #8 by adding "cross-links" from/to Docs/Reference at the bottom of their respective sidebars.

@thejcannon thejcannon enabled auto-merge (squash) December 30, 2023 20:33
},
{
type: "doc",
id: "docs/introduction/how-does-pants-work",
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't need to be solved now, but just exploring the space: what happens if we want to change this entry page?

For instance, we add some awesome new landing page for Pants 2.34, that doesn't exist in 2.33 or earlier.

Is it possible to customise per version? Or use some generic entry point like docs that each version redirects itself?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, there is per-version sidebars (this particular file is for docs/, note all the other files in this PR (one per version)

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, From the file names, I assumed they were auto-generated from this one... are they all manually maintained? When we add a new version do we have to manually copy it across?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, it's handled automatically by the versioning scripts. Check out the Docusaurus versioning docs

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see https://docusaurus.io/docs/versioning#tagging-a-new-version

Once it's tagged, I assume they're then manually maintained? As in, you made these edits "manually" (by copying the file around, I imagine)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup! That's right

@thejcannon thejcannon merged commit daed247 into main Jan 2, 2024
1 check passed
@thejcannon thejcannon deleted the jcannon/docs-ref-links branch January 13, 2024 18:45
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.

Consider showing both text docs "Docs" and API docs "Reference" in single sidebar, same as old site
2 participants