Skip to content

docs: replace version badges with versionBadge component - #35872

Open
OrbisK wants to merge 6 commits into
nuxt:mainfrom
OrbisK:docs/version-badge
Open

docs: replace version badges with versionBadge component#35872
OrbisK wants to merge 6 commits into
nuxt:mainfrom
OrbisK:docs/version-badge

Conversation

@OrbisK

@OrbisK OrbisK commented Jul 28, 2026

Copy link
Copy Markdown
Member

🔗 Linked issue

Followup on/waiting for nuxt/nuxt.com#2327

📚 Description

  • replaced all :badges with :versionBadges.
  • updated the contribution docs to fit the new style. (handle hidden badges etc)
  • added some missing badges
  • added bump workflow that replaces "unreleased" keyword with bumped version

(used claude to refactor docs badges)

@github-actions github-actions Bot added 5.x 📚 documentation Documentation improvements or additions labels Jul 28, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@35872

@nuxt/nitro-server

npm i https://pkg.pr.new/@nuxt/nitro-server@35872

nuxt

npm i https://pkg.pr.new/nuxt@35872

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@35872

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@35872

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@35872

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@35872

commit: 127a24d

@OrbisK
OrbisK marked this pull request as ready for review July 29, 2026 11:18
@OrbisK
OrbisK requested a review from danielroe as a code owner July 29, 2026 11:18
@coderabbitai

This comment has been minimized.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
scripts/_unreleased-version.test.ts (1)

23-86: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the file-stamping workflow.

The suite tests pure transforms but not stampUnreleasedVersions. Add a temporary-tree test covering docs/**/*.md, packages/*/src/**/*.{ts,mts,vue}, file writes, and the returned relative paths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/_unreleased-version.test.ts` around lines 23 - 86, Add an
integration-style test for stampUnreleasedVersions using a temporary directory
containing matching docs/**/*.md and packages/*/src/**/*.{ts,mts,vue} files plus
non-matching files. Verify placeholders are stamped, transformed contents are
written back, and the returned paths are the expected relative paths; clean up
the temporary tree afterward.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/2.directory-structure/1.app/1.utils.md`:
- Line 52: Move the version badges to the end of their complete descriptions: in
docs/2.directory-structure/1.app/1.utils.md lines 52-52, place the 4.6 badge
after the final sentence; in docs/4.api/3.utils/clear-nuxt-state.md lines 26-26,
place the 4.4 badge after the complete reset description. Preserve the existing
wording and links.

In `@docs/5.community/4.contribution.md`:
- Line 316: Add the missing comma after “Until then” in the contribution
documentation sentence, so it reads “Until then, the badge reads …” while
leaving the surrounding release-version guidance unchanged.

---

Nitpick comments:
In `@scripts/_unreleased-version.test.ts`:
- Around line 23-86: Add an integration-style test for stampUnreleasedVersions
using a temporary directory containing matching docs/**/*.md and
packages/*/src/**/*.{ts,mts,vue} files plus non-matching files. Verify
placeholders are stamped, transformed contents are written back, and the
returned paths are the expected relative paths; clean up the temporary tree
afterward.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3d9b5568-2ab6-4abb-befd-2d82eb269f11

📥 Commits

Reviewing files that changed from the base of the PR and between df18c4a and 6544607.

📒 Files selected for processing (31)
  • docs/1.getting-started/09.transitions.md
  • docs/2.directory-structure/1.app/1.components.md
  • docs/2.directory-structure/1.app/1.layouts.md
  • docs/2.directory-structure/1.app/1.pages.md
  • docs/2.directory-structure/1.app/1.utils.md
  • docs/2.directory-structure/1.server.md
  • docs/3.guide/1.concepts/5.modules.md
  • docs/3.guide/6.going-further/7.layers.md
  • docs/4.api/1.components/3.nuxt-layout.md
  • docs/4.api/1.components/4.nuxt-link.md
  • docs/4.api/2.composables/use-async-data.md
  • docs/4.api/2.composables/use-cookie.md
  • docs/4.api/2.composables/use-fetch.md
  • docs/4.api/2.composables/use-nuxt-app.md
  • docs/4.api/3.utils/call-once.md
  • docs/4.api/3.utils/clear-nuxt-state.md
  • docs/4.api/3.utils/define-page-meta.md
  • docs/4.api/3.utils/set-page-layout.md
  • docs/4.api/4.commands/build.md
  • docs/4.api/4.commands/dev.md
  • docs/4.api/4.commands/generate.md
  • docs/4.api/5.kit/15.builder.md
  • docs/4.api/5.kit/7.pages.md
  • docs/4.api/6.advanced/2.import-meta.md
  • docs/4.api/6.nuxt-config.md
  • docs/5.community/4.contribution.md
  • docs/5.community/5.framework-contribution.md
  • scripts/_unreleased-version.test.ts
  • scripts/_unreleased-version.ts
  • scripts/bump.ts
  • vitest.config.ts


::tip
Types can be auto-imported the same way. Put app-only types in `app/types/`, server-only types in [`server/types/`](/docs/4.x/directory-structure/server#server-types), and types shared between both in [`shared/types/`](/docs/4.x/directory-structure/shared).
Types can be auto-imported the same way. :versionBadge{version="4.6"} Put app-only types in `app/types/`, server-only types in [`server/types/`](/docs/4.x/directory-structure/server#server-types), and types shared between both in [`shared/types/`](/docs/4.x/directory-structure/shared).

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Place version badges after the complete description.

Both occurrences place the badge before remaining text, conflicting with the documented “badge must be last” rule and risking awkward spacing when hidden.

  • docs/2.directory-structure/1.app/1.utils.md#L52-L52: move the 4.6 badge after the final sentence.
  • docs/4.api/3.utils/clear-nuxt-state.md#L26-L26: move the 4.4 badge after the complete reset description.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~52-~52: Loose punctuation mark.
Context: ...ypes can be auto-imported the same way. :versionBadge{version="4.6"} Put app-only...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~52-~52: Loose punctuation mark.
Context: ...(/docs/4.x/directory-structure/shared). ::

(UNLIKELY_OPENING_PUNCTUATION)

📍 Affects 2 files
  • docs/2.directory-structure/1.app/1.utils.md#L52-L52 (this comment)
  • docs/4.api/3.utils/clear-nuxt-state.md#L26-L26
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/2.directory-structure/1.app/1.utils.md` at line 52, Move the version
badges to the end of their complete descriptions: in
docs/2.directory-structure/1.app/1.utils.md lines 52-52, place the 4.6 badge
after the final sentence; in docs/4.api/3.utils/clear-nuxt-state.md lines 26-26,
place the 4.4 badge after the complete reset description. Preserve the existing
wording and links.

Comment thread docs/5.community/4.contribution.md Outdated
@codspeed-hq

codspeed-hq Bot commented Jul 29, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 21 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing OrbisK:docs/version-badge (127a24d) with main (fabc63e)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x 📚 documentation Documentation improvements or additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant