Skip to content

feat: add @nuxtjs/seo and configure it with submodules#7

Merged
toddeTV merged 16 commits into
mainfrom
feat/add-seo
Mar 4, 2026
Merged

feat: add @nuxtjs/seo and configure it with submodules#7
toddeTV merged 16 commits into
mainfrom
feat/add-seo

Conversation

@toddeTV
Copy link
Copy Markdown
Owner

@toddeTV toddeTV commented Mar 4, 2026

This PR integrates the @nuxtjs/seo module to enhance the site discoverability and social sharing experience. It adds dedicated OG image templates, configures Schema.org Person identity with dynamic social links, and implements automated SEO metadata for all pages.

Summary by CodeRabbit

  • New Features

    • Social links (GitHub, X, Bluesky, LinkedIn) added as structured content and surfaced site-wide, including Schema.org sameAs enrichment.
    • Homepage Open Graph image support with a new OG image component and shared footer for social previews.
    • Page-level SEO/OG metadata handling enhanced (use of SEO/meta/ogImage when available).
  • Chores

    • SEO module and site-level SEO/robots/configuration integrated.
  • Documentation

    • Clarified review/tooling comments and feedback tier descriptions.

@toddeTV toddeTV self-assigned this Mar 4, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Lite

Run ID: 5ccdd8c2-44bc-496a-8913-054c35515660

📥 Commits

Reviewing files that changed from the base of the PR and between e479587 and 49d1d83.

📒 Files selected for processing (1)
  • .coderabbit.yml

📝 Walkthrough

Walkthrough

Integrates @nuxtjs/seo, adds OG image components, creates a socials content collection, loads socials into Schema.org Person identity in app.vue, and applies page-level SEO/head/ogImage when present.

Changes

Cohort / File(s) Summary
Nuxt config & deps
nuxt.config.ts, package.json, .coderabbit.yml
Added @nuxtjs/seo to modules, configured site/ogImage/robots/schemaOrg, added components auto-import config and a keywords head meta entry; added devDependency @nuxtjs/seo. Clarifying comment in CI config.
Content configuration
content.config.ts
Wrapped page collection with asSeoCollection excluding socials/**; added socials data collection with Zod schema (name, url, icon, sortOrder); imported asSeoCollection and z.
Content data: socials
content/socials/*.yml
content/socials/github.yml, content/socials/x.yml, content/socials/bluesky.yml, content/socials/linkedin.yml
Added four social data files defining name, url, icon, and sortOrder for each social link.
Homepage metadata
content/index.md
Added frontmatter with title/description/author, SEO fields (og*, twitter*), ogImage config, and sitemap hints.
App-level SEO integration
app/app.vue
Asynchronously loads socials collection and, if present, injects URLs into Schema.org Person via definePerson (sameAs) before render.
Page-level SEO hooks
app/pages/[...slug].vue
After fetching page, conditionally calls useSeoMeta, useHead, and defineOgImage when page.value.seo, page.value.head, or page.value.ogImage exist.
OG image components
app/components/OgImage/OgImageHome.vue, app/components/OgImage/components/OgImageFooter.vue
Added new SFCs for static 1200×630 OG image rendering (declarative inline styles suitable for Satori). OgImageHome accepts title and description props; OgImageFooter is a static footer component.

Sequence Diagram(s)

sequenceDiagram
    participant Browser
    participant AppVue as app.vue
    participant Content as Content System
    participant Page as Page Loader
    participant SEOModule as `@nuxtjs/seo`
    participant SchemaOrg as Schema.org
    participant Renderer as Vue Renderer

    Browser->>AppVue: Initial load
    AppVue->>Content: fetch collection('socials')
    Content-->>AppVue: socials list
    AppVue->>SchemaOrg: definePerson({ sameAs: social URLs })
    SchemaOrg-->>AppVue: Person identity set

    Browser->>Page: Request page (e.g., index or slug)
    Page->>Content: fetch page data
    Content-->>Page: page with metadata
    Page->>SEOModule: useSeoMeta/useHead/defineOgImage (conditional)
    SEOModule-->>Renderer: apply meta & head config
    Renderer->>Browser: render page with SEO metadata
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes


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

Copy link
Copy Markdown

@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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.coderabbit.yml:
- Around line 8-9: Update the comment describing the "chill" profile so it
doesn't claim it's "critical-only"; locate the "chill" profile comment (the line
that currently reads "`chill` only reports critical issues") and reword it to
reflect lighter feedback—e.g., "`chill` provides lighter, less-frequent feedback
focused on higher-severity issues"—so the description matches the configured
schema and avoids misleading operators.

In `@content/index.md`:
- Around line 8-21: Remove the redundant SEO keys and the hardcoded OG image
URL: delete the duplicate seo.* entries that are auto-derived from
title/description/route (ogTitle, ogDescription, ogType, ogUrl, twitterTitle,
twitterDescription, twitterCard) and remove seo.ogImage that contains the
hardcoded https://.../og.png; instead rely on the existing ogImage defaults
configured in nuxt.config.ts and the OgImageHome component. If you need to
customise the OG image, keep only the ogImage block with component: OgImageHome
and omit props (or only include props that differ from OgImageHome.withDefaults
like a custom title/description), but do not hardcode the generated URL.

In `@nuxt.config.ts`:
- Around line 167-170: The robots user-agent list contains duplicate/outdated
entries: remove the outdated 'Claude-Web' and the duplicate 'anthropic-ai' from
the user-agent array in nuxt.config.ts so the list only contains current, unique
agents; locate the array where those strings appear and delete those two entries
(keeping any other agents intact).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Lite

Run ID: 69335509-f579-4207-b9c2-e67c3446e5ce

📥 Commits

Reviewing files that changed from the base of the PR and between 7555586 and e479587.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (13)
  • .coderabbit.yml
  • app/app.vue
  • app/components/OgImage/OgImageHome.vue
  • app/components/OgImage/components/OgImageFooter.vue
  • app/pages/[...slug].vue
  • content.config.ts
  • content/index.md
  • content/socials/bluesky.yml
  • content/socials/github.yml
  • content/socials/linkedin.yml
  • content/socials/x.yml
  • nuxt.config.ts
  • package.json

Comment thread .coderabbit.yml Outdated
Comment thread content/index.md
Comment thread nuxt.config.ts
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.

1 participant