
Nuxt Seo
Configure Nuxt robots.txt, sitemap.xml, and per-route crawl rules so solo builders ship indexable sites and control AI crawler access without hand-rolling SEO plumbing.
Overview
Nuxt SEO is an agent skill most often used in Launch (also Build integrations) that configures Nuxt robots, sitemaps, and per-page crawl rules for solo-builder sites.
Install
npx skills add https://github.com/onmax/nuxt-skills --skill nuxt-seoWhat is this skill?
- Auto-generated /robots.txt and /sitemap.xml with nuxt.config robots and sitemap module options
- blockAiBots and blockNonSeoBots toggles plus custom robots groups and routeRules for /admin and similar paths
- Per-page useRobotsRule() with object syntax (noindex, nofollow, noai, max-snippet, max-image-preview)
- Nuxt Content frontmatter robots fields for noindex on draft or gated pages
- Dynamic sitemap URLs via server/api/__sitemap__/urls and zeroRuntime for static deployments
Adoption & trust: 1.8k installs on skills.sh; 674 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Nuxt app is live but you are unsure how to expose robots.txt and sitemap.xml, block admin routes, or set noindex and AI-crawler rules without breaking the framework defaults.
Who is it for?
Indie builders shipping Nuxt 3 marketing or content sites who want module-native SEO crawl controls before indexing.
Skip if: Teams on non-Nuxt stacks, purely client-side SPAs without SSR, or marketers who only need keyword copy with no technical setup.
When should I use this skill?
When configuring Nuxt crawlability, robots.txt, sitemap.xml, per-page indexing, or AI-bot blocking for a Nuxt site.
What do I get? / Deliverables
You leave with concrete nuxt.config, routeRules, useRobotsRule, Content frontmatter, and optional __sitemap__ API patterns so crawlers and search tools see the right URLs and directives.
- nuxt.config robots and sitemap blocks
- Per-route robots rules and optional __sitemap__ URL handler
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Technical crawlability and sitemap delivery are canonical launch/SEO concerns—the skill documents the moment you wire discoverability endpoints before or right after go-live. Robots, sitemaps, and index/noindex directives map directly to the seo subphase (search engines and crawlers), including optional noai-style controls for generative crawlers.
Where it fits
Add sitemap sources and exclude /admin/** while the Nuxt app structure is still being finalized.
Turn on blockNonSeoBots and verify /sitemap.xml lists public routes before submitting to Google Search Console.
Set noai and noimageai on selective pages to limit training crawlers without blanket site noindex.
Use Content frontmatter robots noindex on archived posts while keeping the rest of the blog indexable.
How it compares
Framework-specific Nuxt module guidance—not a generic Lighthouse checklist or a hosted SEO SaaS.
Common Questions / FAQ
Who is nuxt-seo for?
Solo and indie developers using Nuxt who own deployment and need robots, sitemap, and per-page indexing rules in code.
When should I use nuxt-seo?
At launch when wiring /robots.txt and /sitemap.xml, when blocking /admin or staging, when tuning AI bot blocking, and during build when adding routeRules or Content frontmatter for noindex pages.
Is nuxt-seo safe to install?
Treat it as documentation-style procedural knowledge; review the Security Audits panel on this Prism page before trusting any third-party skill package in your repo.
SKILL.md
READMESKILL.md - Nuxt Seo
# Crawlability: Robots & Sitemap ## Robots.txt Auto-generated at `/robots.txt`. Respects `site.indexable` setting. ### Configuration ```ts // nuxt.config.ts export default defineNuxtConfig({ robots: { // Block AI crawlers blockAiBots: true, // Block non-SEO bots (reduces server load) blockNonSeoBots: true, // Custom rules groups: [ { userAgent: '*', disallow: ['/admin'] } ] } }) ``` ### Per-Page Control ```ts // Disable indexing useRobotsRule('noindex, nofollow') // Object syntax with AI directives useRobotsRule({ noindex: true, nofollow: true, noai: true, // Block AI training noimageai: true, // Block AI image training 'max-snippet': 150, // Preview controls 'max-image-preview': 'large' }) ``` Route rules: ```ts export default defineNuxtConfig({ routeRules: { '/admin/**': { robots: 'noindex, nofollow' }, '/hidden': { robots: false } } }) ``` ### Nuxt Content Frontmatter ```yaml --- robots: noindex, nofollow # Or structured: robots: noindex: true nofollow: true --- ``` ## Sitemap.xml Auto-generated at `/sitemap.xml` from app routes. ### Configuration ```ts // nuxt.config.ts export default defineNuxtConfig({ sitemap: { sources: ['/api/__sitemap__/urls'], exclude: ['/admin/**', '/secret'], // For static sites - no runtime generation zeroRuntime: true } }) ``` ### Dynamic URLs via API ```ts // server/api/__sitemap__/urls.ts import { defineSitemapEventHandler } from '#imports' import type { SitemapUrlInput } from '#sitemap/types' export default defineSitemapEventHandler(async () => { const posts = await $fetch('/api/posts') return posts.map(post => ({ loc: post.path, lastmod: post.updatedAt, // Image sitemap images: [{ loc: post.image, title: post.title }], // Video sitemap videos: [{ content_loc: post.videoUrl, title: post.title }] } satisfies SitemapUrlInput)) }) ``` ### Per-Page Control Route rules: ```ts export default defineNuxtConfig({ routeRules: { '/blog/**': { sitemap: { changefreq: 'daily', priority: 0.9 } }, '/hidden': { sitemap: false } } }) ``` Nuxt Content frontmatter: ```yaml --- sitemap: changefreq: weekly priority: 0.8 lastmod: 2025-01-15 --- ``` ### Multiple Sitemaps For large sites: ```ts export default defineNuxtConfig({ sitemap: { sitemaps: { pages: { include: ['/**'], exclude: ['/blog/**'] }, blog: { include: ['/blog/**'] } } } }) ``` Generates `/pages-sitemap.xml`, `/blog-sitemap.xml`, and `/sitemap_index.xml`. ### i18n Sitemaps With `@nuxtjs/i18n`, auto-generates per-locale sitemaps with `hreflang` alternates. ## Debug In development: - Robots: Check `/robots.txt` directly - Sitemap: Visit `/__sitemap__/debug.json` for raw data # OG Image Generation Dynamic Open Graph image generation using Vue components. ## Quick Start ```ts // 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: ```ts 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: ```ts // 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/`: ```vue <!-- 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">