docs(docusaurus): move version dropdown to left navbar; shorten label to 'main'#1238
Conversation
|
could you include before and after screen shots? |
It's a minor change to the wording of 'main' (removing unreleased) and moving it after the first main links. It will be more obvious after our release as it will then inherit the correct release name. In the current published version it's in the middle of other links. So a very small change - maybe we could do more, but I think it's an improvement |
psschwei
left a comment
There was a problem hiding this comment.
I think it's a good fix, though should we have something like 'version: main` to call out that it's the version? the word main by itself is a bit ambiguous
The default for docusaurus is actually 'Next' - something other sites use. We also have to be careful as some of the code in docusaurus relates to the filesystem structure (ie the top level directory). next is acually the default here - so I'm now thinking let's just leave at the pure default... It will become clearer after a release |
… to 'main' Two navbar polish changes: - docsVersionDropdown moved from right (between Community and GitHub) to left (after API Reference), so it groups with content navigation rather than sitting between external links - current version label shortened from 'main (unreleased)' to 'main' for cleaner display in the dropdown Signed-off-by: Nigel Jones <jonesn@uk.ibm.com> Assisted-by: Claude Code
…tions - Update two 'main (unreleased)' references to 'main' to match the label change in docusaurus.config.ts - Expand the fork PR note into a full 'Previewing from your own fork' section covering the GitHub Pages bootstrap pattern (docs/staging workaround) and the fork baseUrl difference Signed-off-by: Nigel Jones <jonesn@uk.ibm.com> Assisted-by: Claude Code
Remove the docs/staging bootstrap step (peaceiris creates gh-pages automatically on first push) and the baseUrl explanation (handled transparently by the workflow). Signed-off-by: Nigel Jones <jonesn@uk.ibm.com> Assisted-by: Claude Code
Drop the explicit 'main' label on the current (unreleased) version so Docusaurus uses its default 'Next'. This also removes the need for set-last-version.mjs to inject a path on first release — Docusaurus routes the current version to /next/ automatically. Remove the CLI reference page entry from the sidebar and its redirect rules from the config; update in-page 'CLI Reference' cross-links to point to the API Reference instead. Assisted-by: Claude Code Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
957b7f5 to
85cbdaf
Compare
ajbozarth
left a comment
There was a problem hiding this comment.
Two of the three changes here look good (navbar move, label/banner/set-last-version.mjs cleanup). The CLI-reference removal has loose ends that I think warrant splitting it out:
- The generator still writes the page:
pyproject.tomldefinesclidocs/clidocs-cleanpoe tasks,tooling/docs-autogen/generate_cli_reference.pystill emitsdocs/docs/reference/cli.md, andtooling/docs-autogen/generate-ast.py:776still insertsSee the [CLI Reference](/reference/cli)into the auto-generated API landing. After this PR the landing page will link to something not in any sidebar. docs/CONTRIBUTING_DOCS.md:481still uses[CLI Reference](../reference/cli)as the canonical "See also" example.- The 17
/api/cli/...redirect entries are removed, but the destination (/reference/cli) is also being de-listed — anyone with bookmarks to either path 404s.
Suggest splitting into:
- Navbar move + label/banner/
set-last-version.mjscleanup + PUBLISHING.md updates (LGTM after the small fixes below) - CLI reference removal as a separate PR that also handles the generator, ast link, CONTRIBUTING_DOCS example, and a deliberate decision on the redirects
A couple of smaller things:
- Title nit: "shorten label to 'main'" is stale — the final implementation uses the Docusaurus default (
Next), which is the cleaner way to drop the verbose(unreleased). Worth updating to something likeuse Docusaurus default version labelso the title matches what landed. - Could you also refresh the screenshots in the PR description? Both the before/after blockquotes and the attached images still show
main ▾, but the dropdown now renders asNext ▾.
CLI reference removal has loose ends (generator, ast link, CONTRIBUTING_DOCS) that warrant a dedicated PR. Restore the sidebar entry, redirects, and in-page links to keep this PR focused on navbar and version label changes. Assisted-by: Claude Code Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
Docusaurus default label for the unreleased version is 'Next', not 'main'. Update prose in PUBLISHING.md to match what actually renders. Assisted-by: Claude Code Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
ajbozarth
left a comment
There was a problem hiding this comment.
LGTM for now, I ran it locally and the Next could be a bit confusing, but it's only for another couple weeks so I think it's fine
|
the cli changes were an error - lingering changes left on the branch. not intended for here |
df1eb61


What and why
1. Navbar version dropdown position
The version dropdown currently sits on the right side of the navbar, between Community and GitHub:
That position is confusing — it looks like an external link rather than a navigation control for the docs content. This PR moves it to the left side, immediately after API Reference:
2. Version label: use Docusaurus default
Rather than an explicit label, the
currentversion block now relies on Docusaurus's built-in default label (Next). This:set-last-version.mjspreviously injectedpath: 'main'into the config on first release; with no explicit label or path set, Docusaurus routes the current version to/next/automatically, so that injection step is no longer needed3. CLI reference page removed
The auto-generated CLI reference page (
reference/cli) has been removed from the sidebar and its Mintlify-era redirect rules removed from the config. In-page cross-links in the how-to and integration docs updated to point to the API Reference instead.4. PUBLISHING.md: stale label refs + fork preview docs
'main (unreleased)'that would have become stale.docs/stagingworkaround needed whengh-pagesdoesn't exist yet) and the forkbaseUrldifference (/mellea/vs/).Notes
The
build-and-validateCI job builds the full Docusaurus site on every PR touchingdocs/, so any config error would be caught before merge.