Index of every page on this site: llms.txt
All skills
onmax avatar

/nuxt-seo

@2e74504 official
by Maxonmax/nuxt-skills722 stars
38
Run it yourself

Nuxt SEO meta-module with robots, sitemap, og-image, schema-org. Use when configuring SEO, generating sitemaps, creating OG images, or adding structured data.

Use this Skill: https://skilld.dev/gh/onmax/nuxt-skills/nuxt-seo

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesog-image.md

≈817 tokens on demand. Your agent reads this file only when SKILL.md points to it.

OG Image Generation

Dynamic Open Graph image generation using Vue components.

Quick Start

// Component-first (recommended)
defineOgImage('NuxtSeo', { title: 'My Page Title' })

// Object syntax
defineOgImage({ component: 'NuxtSeo', title: 'My Page Title' })

// Disable OG image
defineOgImage(false)

Built-in Template

The NuxtSeo template supports:

defineOgImage('NuxtSeo', {
  title: 'Hello World',
  description: 'My description',
  theme: '#3b82f6',
  colorMode: 'dark',
  icon: 'carbon:cloud',
  siteName: 'My Site',
  siteLogo: '/logo.png'
})

Multiple Images Per Page

Use key for platform-specific images:

// Default OG image (1200x600)
defineOgImage('NuxtSeo', { title: 'Default' })

// Square for WhatsApp (800x800)
defineOgImage('NuxtSeo', {
  title: 'Square',
  key: 'square',
  width: 800,
  height: 800
})

Custom Vue Components

Create in components/OgImage/:

<!-- components/OgImage/Blog.vue -->
<script setup lang="ts">
defineProps<{ title: string; author: string }>()
</script>

<template>
  <div class="w-full h-full flex flex-col justify-center items-center bg-gradient-to-br from-blue-500 to-purple-600 p-12">
    <h1 class="text-6xl font-bold text-white text-center">{{ title }}</h1>
    <p class="text-2xl text-white/80 mt-4">By {{ author }}</p>
  </div>
</template>

Use in pages:

defineOgImage('OgImageBlog', { title: 'My Post', author: 'John' })

Renderers

Renderer Speed CSS Support Edge Best For
satori Fast Partial ✅ Default, most templates
chromium Slow Full ❌ Complex designs, prerender
export default defineNuxtConfig({
  ogImage: {
    defaults: { renderer: 'satori' }
  }
})

Satori Limitations

  • No display: grid - use flex
  • No position: absolute without explicit dimensions
  • Fonts: use @nuxt/fonts with global: true for best results

Configuration

export default defineNuxtConfig({
  ogImage: {
    defaults: {
      component: 'NuxtSeo',
      width: 1200,
      height: 600,
      cacheMaxAgeSeconds: 60 * 60 * 24 * 3  // 3 days
    },
    // For static sites
    zeroRuntime: true
  }
})

Nuxt Content

Frontmatter:

---
ogImage:
  component: OgImageBlog
  props:
    author: John Doe
---

With asSeoCollection() (see main SKILL.md):

<script setup>
const { data: page } = await useAsyncData(() => queryCollection('posts').path(route.path).first())
if (page.value?.ogImage)
  defineOgImage(page.value.ogImage)
</script>

Debug

  • Preview: /__og-image__/image/[path]/og.png
  • Inspector: Enable ogImage: { debug: true } in config

Screenshots

Capture page as OG image (requires Chromium):

defineOgImageScreenshot({
  colorScheme: 'dark',
  mask: '.navigation, .footer',
  selector: '.article-content'
})

Route Rules

export default defineNuxtConfig({
  routeRules: {
    '/blog/**': { ogImage: { component: 'OgImageBlog' } },
    '/admin/**': { ogImage: false }
  }
})

Deployment

Community templates are dev-only. Before deploying, eject:

npx nuxt-og-image eject NuxtSeo

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides documentation and configuration examples for the Nuxt SEO module suite. It covers site configuration, robots.txt, sitemaps, Open Graph images, schema.org structured data, and SEO utilities. No malicious patterns or security risks were identified.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • Runlayer8mo

    6 files scanned · No issues

  • ZeroLeaks6mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 2e74504. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 9 months ago
  • Nuxt
  • SEO
  • sitemap
  • og-image
  • schema-org
  • robots-txt
  • structured-data
  • json-ld
  • metadata

README badge

README badge for onmax/nuxt-skills/nuxt-seo

Generates and manages SEO metadata for Nuxt apps: robots.txt, sitemap.xml, dynamic OG images, JSON-LD structured data, and canonical URLs. Use this skill when configuring site SEO foundation, building crawlable sitemaps, creating social media preview images, or adding schema.org markup to pages.

Generated from the current SKILL.md.

Does this work with Nuxt Content?
Yes. Use `asSeoCollection()` to automatically generate sitemaps, OG images, and schema-org from Nuxt Content v3 frontmatter. Load @nuxtjs/seo before @nuxt/content in the modules array.
Can I generate dynamic OG images?
Yes. The skill includes nuxt-og-image for dynamic OG image generation. Load references/og-image.md for implementation details.
What structured data formats does this support?
JSON-LD via schema.org through the nuxt-schema-org module. Access it with `useSchemaOrg()` and refer to references/schema-org.md for configuration.
Does this handle robots.txt and sitemaps?
Yes. The skill includes @nuxtjs/robots for robots.txt generation and @nuxtjs/sitemap for sitemap.xml. Use `useRobotsRule()` and `defineSitemapEventHandler()` respectively.
What is the base configuration requirement?
You must configure the `site` object in nuxt.config.ts and access it via `useSiteConfig()`. This is the foundation all SEO modules depend on.

Generated from the current SKILL.md. These answers refresh after source changes.