Skip to content

docs: upgrade nuxt-og-image and add nuxt-schema-org#6412

Merged
benjamincanac merged 6 commits intov4from
docs/agent-readability-og-image-v6
Apr 30, 2026
Merged

docs: upgrade nuxt-og-image and add nuxt-schema-org#6412
benjamincanac merged 6 commits intov4from
docs/agent-readability-og-image-v6

Conversation

@benjamincanac
Copy link
Copy Markdown
Member

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@github-actions github-actions Bot added the v4 #4488 label Apr 30, 2026
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 30, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​takumi-rs/​core@​1.1.2791008596100

View full report

@benjamincanac benjamincanac changed the title docs: improve agent readability and upgrade nuxt-og-image to v6 docs: upgrade nuxt-og-image and add nuxt-schema-org Apr 30, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new composable useCanonical() to centralize canonical link generation and replaces per-page manual canonical construction. Moves server-side SEO registration into import.meta.server-guarded useSeoMeta calls and emits Schema.org structured data via nuxt-schema-org helpers. Replaces many defineOgImageComponent('Docs') usages with defineOgImage('Docs.takumi'). Updates Nuxt config and package.json for schema/OG support. Migrates server handlers to defineEventHandler/defineCachedEventHandler, replaces setHeader with setResponseHeader, enables SWR caching on selected routes, and makes small OG-image component prop/template/CSS changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description field contains only the PR template with no actual content provided by the author, making it vague and non-descriptive about the changeset. Provide a meaningful description explaining why these package upgrades were necessary, what benefits they bring, and any migration details or breaking changes introduced.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main changes: upgrading nuxt-og-image and adding nuxt-schema-org support across the documentation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/agent-readability-og-image-v6

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/app/composables/useCanonical.ts (1)

1-2: ⚡ Quick win

Split the Vue type import onto its own line.

This mixes MaybeRefOrGetter into a value import, which breaks the repo’s import-style rule.

Suggested fix
 import { withoutTrailingSlash } from 'ufo'
-import { toValue, type MaybeRefOrGetter } from 'vue'
+import { toValue } from 'vue'
+import type { MaybeRefOrGetter } from 'vue'

As per coding guidelines, **/*.{ts,tsx,vue}: Always use separate type imports: import type { X } on its own line, distinct from regular imports.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/app/composables/useCanonical.ts` around lines 1 - 2, The import
currently mixes a value and a type from 'vue'; split them into separate imports
so the type uses an `import type` statement: change the combined import that
brings in toValue and MaybeRefOrGetter to two lines—one importing the runtime
symbol `toValue` and another importing the type `MaybeRefOrGetter` via `import
type`—so functions like toValue and the MaybeRefOrGetter type are imported
according to the repo's import-style rule.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/app/pages/docs/`[...slug].vue:
- Around line 77-83: The canonical/alternate link is missing the /raw prefix so
useCanonical is pointing at `${path.value}.md` instead of the prerendered
`/raw/...md`; update the code to compute the raw markdown URL (e.g. a computed
rawPath using joinURL('/raw', `${path.value}.md`) or similar) and pass that
rawPath into useCanonical (and reuse the same rawPath for prerenderRoutes) so
both prerenderRoutes(...) and useCanonical(...) reference the identical
`/raw/...md` URL; look for the computed path variable, the prerenderRoutes call
and the useCanonical call to make this change.

---

Nitpick comments:
In `@docs/app/composables/useCanonical.ts`:
- Around line 1-2: The import currently mixes a value and a type from 'vue';
split them into separate imports so the type uses an `import type` statement:
change the combined import that brings in toValue and MaybeRefOrGetter to two
lines—one importing the runtime symbol `toValue` and another importing the type
`MaybeRefOrGetter` via `import type`—so functions like toValue and the
MaybeRefOrGetter type are imported according to the repo's import-style rule.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5b4af2d3-7fc2-478b-bbd3-b58e649dd998

📥 Commits

Reviewing files that changed from the base of the PR and between 4587079 and 658090b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (23)
  • docs/app/app.vue
  • docs/app/components/og-image/Component.takumi.vue
  • docs/app/components/og-image/Docs.takumi.vue
  • docs/app/composables/useCanonical.ts
  • docs/app/error.vue
  • docs/app/pages/blog/[...slug].vue
  • docs/app/pages/blog/index.vue
  • docs/app/pages/community.vue
  • docs/app/pages/docs/[...slug].vue
  • docs/app/pages/index.vue
  • docs/app/pages/releases.vue
  • docs/app/pages/showcase.vue
  • docs/app/pages/team.vue
  • docs/app/pages/templates.vue
  • docs/nuxt.config.ts
  • docs/package.json
  • docs/server/plugins/llms.ts
  • docs/server/routes/.well-known/api-catalog.get.ts
  • docs/server/routes/.well-known/mcp/server-card.json.get.ts
  • docs/server/routes/raw/[...slug].md.get.ts
  • docs/server/routes/raw/index.md.get.ts
  • docs/server/routes/sitemap.md.get.ts
  • docs/server/routes/sitemap.xml.get.ts
💤 Files with no reviewable changes (1)
  • docs/server/plugins/llms.ts

Comment thread docs/app/pages/docs/[...slug].vue
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 30, 2026

npm i https://pkg.pr.new/@nuxt/ui@6412

commit: 8bcb04d

- Add SoftwareApplication schema on homepage and BlogPosting on blog posts
- Pass markdown alternate to useCanonical on homepage
- Fix Takumi renderer build failures by replacing line-clamp with overflow
- Add @unhead/schema-org/vue to vite optimizeDeps
- Split type import in useCanonical composable
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/app/components/og-image/Docs.takumi.vue (1)

56-56: ⚡ Quick win

Use a semantic color token instead of raw palette color.

Line [56] uses text-slate-500; switch to a semantic token (e.g. text-muted/text-default) to stay consistent with theme semantics.

Suggested change
-      <p class="text-3xl text-slate-500 overflow-hidden" style="max-height: 5.2em;">
+      <p class="text-3xl text-muted overflow-hidden" style="max-height: 5.2em;">

As per coding guidelines **/*.{vue,ts,tsx,md}: Use semantic color names like text-default, bg-elevated, etc. instead of raw Tailwind palette colors like text-gray-500.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/app/components/og-image/Docs.takumi.vue` at line 56, Replace the raw
Tailwind palette class "text-slate-500" used on the paragraph element in
Docs.takumi.vue with the project's semantic color token (for example
"text-muted" or "text-default"); locate the <p class="text-3xl text-slate-500
overflow-hidden" ...> element and update its class list to remove
"text-slate-500" and add the appropriate semantic token so it follows the
project's theming guidelines.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/app/components/og-image/Docs.takumi.vue`:
- Line 56: Replace the raw Tailwind palette class "text-slate-500" used on the
paragraph element in Docs.takumi.vue with the project's semantic color token
(for example "text-muted" or "text-default"); locate the <p class="text-3xl
text-slate-500 overflow-hidden" ...> element and update its class list to remove
"text-slate-500" and add the appropriate semantic token so it follows the
project's theming guidelines.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 35597597-6417-4cb3-b4c8-2a1934a70f36

📥 Commits

Reviewing files that changed from the base of the PR and between 658090b and 901eb9a.

📒 Files selected for processing (5)
  • docs/app/components/og-image/Component.takumi.vue
  • docs/app/components/og-image/Docs.takumi.vue
  • docs/app/composables/useCanonical.ts
  • docs/app/pages/blog/[...slug].vue
  • docs/app/pages/index.vue
✅ Files skipped from review due to trivial changes (2)
  • docs/app/components/og-image/Component.takumi.vue
  • docs/app/composables/useCanonical.ts

…erved key conflict

In nuxt-og-image v6, `component` is a reserved option that overrides
the OG component resolution, causing all component pages to fail with
"Component not found" errors during prerender.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
docs/app/pages/docs/[...slug].vue (1)

79-83: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Markdown alternate link still points to a different route than prerendered output.

On Line 80 you prerender /raw/...md, but on Line 83 useCanonical() still receives ${path.value}.md (without /raw). This keeps the rel="alternate" type="text/markdown" URL inconsistent with the generated route.

Suggested fix
 const path = computed(() => route.path.replace(/\/$/, ''))
+const markdownPath = computed(() => joinURL('/raw', `${path.value}.md`))

 if (import.meta.server) {
-  prerenderRoutes([joinURL('/raw', `${path.value}.md`)])
+  prerenderRoutes([markdownPath.value])
 }

-useCanonical(computed(() => `${path.value}.md`))
+useCanonical(markdownPath)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/app/pages/docs/`[...slug].vue around lines 79 - 83, The
canonical/alternate markdown URL is inconsistent: prerenderRoutes uses
joinURL('/raw', `${path.value}.md`) but useCanonical(computed(() =>
`${path.value}.md`)) omits the /raw prefix. Update useCanonical to produce the
same route as prerenderRoutes (use joinURL('/raw', `${path.value}.md`) or
conditionally prefix with '/raw' when import.meta.server is true) so the
rel="alternate" text/markdown link matches the prerendered output; reference
joinURL, prerenderRoutes, useCanonical and path.value when making the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@docs/app/pages/docs/`[...slug].vue:
- Around line 79-83: The canonical/alternate markdown URL is inconsistent:
prerenderRoutes uses joinURL('/raw', `${path.value}.md`) but
useCanonical(computed(() => `${path.value}.md`)) omits the /raw prefix. Update
useCanonical to produce the same route as prerenderRoutes (use joinURL('/raw',
`${path.value}.md`) or conditionally prefix with '/raw' when import.meta.server
is true) so the rel="alternate" text/markdown link matches the prerendered
output; reference joinURL, prerenderRoutes, useCanonical and path.value when
making the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: da6a2d84-a31c-4b00-a76c-39d2105dd660

📥 Commits

Reviewing files that changed from the base of the PR and between 901eb9a and fa126f3.

📒 Files selected for processing (2)
  • docs/app/components/og-image/Component.takumi.vue
  • docs/app/pages/docs/[...slug].vue
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/app/components/og-image/Component.takumi.vue

@benjamincanac benjamincanac merged commit 6e96375 into v4 Apr 30, 2026
24 checks passed
@benjamincanac benjamincanac deleted the docs/agent-readability-og-image-v6 branch April 30, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant