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.

referencesutilities.md

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

SEO Utilities

Additional utilities from nuxt-seo-utils and nuxt-link-checker.

Canonical URLs

Automatic canonical URLs based on site config.

export default defineNuxtConfig({
  seoUtils: {
    canonicalQueryWhitelist: ['page', 'sort'],  // Keep these query params
    redirectToCanonicalSiteUrl: true  // 301 to canonical domain
  }
})

Override per-page:

useHead({
  link: [{ rel: 'canonical', href: 'https://example.com/preferred-url' }]
})

Breadcrumbs

Generate breadcrumb items from current route:

const items = useBreadcrumbItems()
// [{ label: 'Home', to: '/' }, { label: 'Blog', to: '/blog' }, { label: 'My Post' }]

For schema.org integration, see schema-org.md.

Render in template:

<template>
  <nav aria-label="Breadcrumb">
    <ol class="flex gap-2">
      <li v-for="(item, i) in items" :key="i">
        <NuxtLink v-if="item.to" :to="item.to">{{ item.label }}</NuxtLink>
        <span v-else>{{ item.label }}</span>
      </li>
    </ol>
  </nav>
</template>

Customize labels in route meta:

// pages/blog/[slug].vue
definePageMeta({
  breadcrumb: { label: 'Article' }
})

Title Templates

Set site-wide title template:

// nuxt.config.ts
export default defineNuxtConfig({
  app: {
    head: {
      titleTemplate: '%s | My Site'
    }
  }
})

Override per-page:

useHead({
  title: 'Page Title',
  titleTemplate: '%s - Different Template'
})

Meta Defaults

// nuxt.config.ts
export default defineNuxtConfig({
  app: {
    head: {
      meta: [
        { name: 'author', content: 'My Name' },
        { property: 'og:site_name', content: 'My Site' }
      ]
    }
  }
})

Link Checker

Build-time validation of links.

export default defineNuxtConfig({
  linkChecker: {
    failOnError: true,  // Default: fail build on errors
    exclude: ['/api/**'],
    skipInspections: ['missing-hash'],
    report: { html: true }  // Generate HTML report
  }
})

Inspections:

  • no-error-response - 404/500 errors
  • no-baseless - Missing base URL
  • no-javascript - javascript: links
  • trailing-slash - Inconsistent slashes
  • missing-hash - Invalid anchor targets
  • no-uppercase-chars - URL casing
  • absolute-site-urls - Hardcoded domain

Ignoring Links

<a href="/maybe-broken" data-link-checker-ignore>Link</a>

File-Based Icons

Place favicon files in public/:

public/
├── favicon.ico
├── favicon.svg        # Modern browsers
├── apple-touch-icon.png
└── site.webmanifest

Auto-detected and added to <head>.

For SVG favicon with dark mode support:

<!-- public/favicon.svg -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
  <style>
    path { fill: #000; }
    @media (prefers-color-scheme: dark) {
      path { fill: #fff; }
    }
  </style>
  <path d="..."/>
</svg>

Social Meta Tags

Automatic Open Graph and Twitter cards from site config (see site-config.md).

Override per-page:

useSeoMeta({
  title: 'Page Title',
  description: 'Page description',
  ogImage: '/images/page-og.png',
  twitterCard: 'summary_large_image'
})

Trailing Slash Redirect

Enforce consistent URLs:

export default defineNuxtConfig({
  site: {
    trailingSlash: false  // Redirect /blog/ to /blog
  }
})

Debug Panel

Enable comprehensive debug panel:

export default defineNuxtConfig({
  seo: { debug: true }
})

Shows in dev:

  • Current meta tags
  • Schema.org data
  • OG image preview
  • Sitemap/robots status

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.