All skills

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

  • 7 files
  • 18.7 KB
  • MIT
  • Updated 8 months ago
  • GitHub

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

This session only. Nothing lands on disk.

referencessite-config.md

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

Site Config

Foundation module providing shared configuration for all SEO modules.

Configuration

// nuxt.config.ts
export default defineNuxtConfig({
  site: {
    url: 'https://example.com',       // Required for absolute URLs
    name: 'My Site',                  // Site name (used in titles, schema)
    description: 'Site description',  // Default meta description
    defaultLocale: 'en',              // Default language
    indexable: true,                  // Allow search engine indexing
    trailingSlash: false,             // URL trailing slash preference
  }
})

Environment-Based Indexing

Control indexing per environment using NUXT_SITE_* env vars:

# .env.production
NUXT_SITE_URL=https://example.com
NUXT_SITE_ENV=production

# .env.staging
NUXT_SITE_URL=https://staging.example.com
NUXT_SITE_ENV=staging

The module auto-detects env and sets indexable: false for non-production environments.

For explicit control:

export default defineNuxtConfig({
  site: {
    url: process.env.NUXT_SITE_URL,
    // Explicit: only index when explicitly set to 'true'
    indexable: process.env.NUXT_SITE_INDEXABLE === 'true'
  }
})

Note: !== 'false' defaults to true when env var is undefined - use === 'true' for fail-safe behavior.

Runtime Access

const site = useSiteConfig()
console.log(site.url, site.name, site.description)

Works in components, composables, and server routes.

i18n Integration

Automatically integrates with @nuxtjs/i18n:

export default defineNuxtConfig({
  site: {
    url: 'https://example.com',
    defaultLocale: 'en',
  },
  i18n: {
    locales: [
      { code: 'en', language: 'en-US' },
      { code: 'fr', language: 'fr-FR' },
    ]
  }
})

Locale-specific overrides in site object:

site: {
  name: 'My Site',
  locales: {
    fr: { name: 'Mon Site' }
  }
}

Override Per-Page

Use route rules for page-specific config:

export default defineNuxtConfig({
  routeRules: {
    '/admin/**': { site: { indexable: false } },
    '/fr/**': { site: { name: 'Mon Site', defaultLocale: 'fr' } }
  }
})

Source: SKILL.md on GitHub

No third-party reports yet.

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

Last checked against GitHub 9 hours ago.

Activeupdated 8 months ago

README badge

README badge for onmax/claude-config/nuxt-seo