Skip to content

docs(docusaurus): move version dropdown to left navbar; shorten label to 'main'#1238

Merged
planetf1 merged 6 commits into
generative-computing:mainfrom
planetf1:docs/navbar-version-dropdown
Jun 15, 2026
Merged

docs(docusaurus): move version dropdown to left navbar; shorten label to 'main'#1238
planetf1 merged 6 commits into
generative-computing:mainfrom
planetf1:docs/navbar-version-dropdown

Conversation

@planetf1

@planetf1 planetf1 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

What and why

1. Navbar version dropdown position

The version dropdown currently sits on the right side of the navbar, between Community and GitHub:

Docs | API Reference — — — Blog | Community | main ▾ | GitHub | mellea.ai

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:

Docs | API Reference | Next ▾ — — — Blog | Community | GitHub | mellea.ai

2. Version label: use Docusaurus default

Rather than an explicit label, the current version block now relies on Docusaurus's built-in default label (Next). This:

  • avoids ambiguity ("main" on its own reads as a menu category, not a version)
  • matches the Docusaurus ecosystem convention for unreleased versions
  • simplifies the release pipeline: set-last-version.mjs previously injected path: '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 needed

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

  • Updates references to 'main (unreleased)' that would have become stale.
  • Expands the brief fork PR warning into a full "Previewing from your own fork" section, covering the GitHub Pages bootstrap pattern (including the docs/staging workaround needed when gh-pages doesn't exist yet) and the fork baseUrl difference (/mellea/ vs /).

Notes

The build-and-validate CI job builds the full Docusaurus site on every PR touching docs/, so any config error would be caught before merge.

@planetf1 planetf1 requested a review from a team as a code owner June 9, 2026 16:42
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 9, 2026
@planetf1 planetf1 requested a review from psschwei June 9, 2026 16:45
@ajbozarth

Copy link
Copy Markdown
Contributor

could you include before and after screen shots?

@planetf1

Copy link
Copy Markdown
Contributor Author
Screenshot 2026-06-15 at 10 46 51 Screenshot 2026-06-15 at 10 46 34

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
ok @ajbozarth ?

@psschwei psschwei left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@planetf1

Copy link
Copy Markdown
Contributor Author

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

planetf1 added 4 commits June 15, 2026 15:49
… 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>
@planetf1 planetf1 force-pushed the docs/navbar-version-dropdown branch from 957b7f5 to 85cbdaf Compare June 15, 2026 14:51

@ajbozarth ajbozarth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.toml defines clidocs / clidocs-clean poe tasks, tooling/docs-autogen/generate_cli_reference.py still emits docs/docs/reference/cli.md, and tooling/docs-autogen/generate-ast.py:776 still inserts See 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:481 still 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:

  1. Navbar move + label/banner/set-last-version.mjs cleanup + PUBLISHING.md updates (LGTM after the small fixes below)
  2. 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 like use Docusaurus default version label so 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 as Next ▾.

Comment thread docs/docusaurus.config.ts
Comment thread docs/PUBLISHING.md Outdated
Comment thread docs/PUBLISHING.md Outdated
Comment thread docs/docs/how-to/refactor-prompts-with-cli.md Outdated
Comment thread docs/docs/community/building-extensions.md Outdated
planetf1 added 2 commits June 15, 2026 16:08
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 ajbozarth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@planetf1

Copy link
Copy Markdown
Contributor Author

the cli changes were an error - lingering changes left on the branch. not intended for here

@planetf1 planetf1 enabled auto-merge June 15, 2026 15:26
@planetf1 planetf1 added this pull request to the merge queue Jun 15, 2026
Merged via the queue into generative-computing:main with commit df1eb61 Jun 15, 2026
9 checks passed
@planetf1 planetf1 deleted the docs/navbar-version-dropdown branch June 15, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants