Skip to content

Take the slug in the manifest from the doc, not from its meta file - #2809

Open
og-orca wants to merge 1 commit into
freeCodeCamp:mainfrom
og-orca:manifest-doc-slug
Open

og-orca wants to merge 1 commit into
freeCodeCamp:mainfrom
og-orca:manifest-doc-slug

Conversation

@og-orca

@og-orca og-orca commented Dec 3, 2026

Copy link
Copy Markdown

Fixes #2808

Enabling Vitest 5 also enables Vitest 4, and opening Vitest 4 shows the pages of Vitest 5. Both entries in docs.json have the slug vitest.

The files of Vitest 4 are in the right place, but the meta.json stored there says "slug":"vitest":

$ curl -s https://documents.devdocs.io/vitest~4/meta.json
{"name":"Vitest","slug":"vitest",...,"version":"4","release":"4.1.0",...}

The manifest copied that slug. It now takes the slug from the doc, which is also what decides where the meta file is read from. Bun 1.3 has the same problem (slug bun) and is fixed too.

Sidebar before and after, with Vitest 5 enabled and with Vitest 4 opened

I checked it like this:

  • I ran the app with the real meta.json and index.json files of Vitest and Vitest 4, before and after. That is the screenshot.
  • I built the manifest from the 852 entries of the live docs.json. Two slugs change, vitest to vitest~4 and bun to bun~1.3, and no duplicates are left.
  • The new test fails on main. All 835 Ruby tests pass here, run on Ruby 3.4.5.

The stored meta.json files stay as they are, so you may still want to regenerate them. The one of Bun 1.3 also has https://leafletjs.com/ as its home link.

I left one thing alone. When the latest version is enabled, opening the group of the older ones under Disabled shows the pages of the latest one. Vite does this on main too. It is in DocList.onOpen, so I can send it as another PR.

@og-orca
og-orca requested a review from a team as a code owner December 3, 2026 05:54
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.

Vitest 5 and Vitest 4 docs share the same internal name, breaking selection

1 participant