### get_module_setup Source: https://nuxtseo.com/docs/nuxt-seo/guides/mcp Get installation guide for a Nuxt SEO module. Returns install command, content, and navigation tree. ```APIDOC ## get_module_setup ### Description Get installation guide for a Nuxt SEO module. Returns install command, content, and navigation tree. ### Parameters #### Query Parameters - **module** (string) - Required - The module to get the setup for. Options include: `nuxt-seo`, `robots`, `sitemap`, `og-image`, `schema-org`, `link-checker`, `seo-utils`, `site-config`. ### Request Example ```ts get_module_setup({ module: 'schema-org' }) ``` ``` -------------------------------- ### Get Nuxt SEO Module Setup Guide Source: https://nuxtseo.com/docs/nuxt-seo/guides/mcp Retrieve the installation guide for a specified Nuxt SEO module. This function returns the install command, content, and navigation tree. ```typescript get_module_setup({ module: 'schema-org' }) ``` -------------------------------- ### Install Ably Source: https://nuxtseo.com/docs/skew-protection/providers/external Install the Ably SDK using npm or yarn. ```bash npx nypm add ably ``` -------------------------------- ### Start Development Server Source: https://nuxtseo.com/docs/ai-ready/guides/cli Starts the Nuxt development server. This is often a prerequisite for other CLI commands. ```bash nuxi dev ``` -------------------------------- ### Install Pusher JS Source: https://nuxtseo.com/docs/skew-protection/providers/external Install the Pusher JavaScript library using npm or yarn. ```bash npx nypm add pusher-js ``` -------------------------------- ### Install Nuxt SEO Module Source: https://nuxtseo.com Install the Nuxt SEO module using the Nuxt module add command. ```bash $ npx nuxt module add seo ``` -------------------------------- ### Install @nuxtjs/seo Package Source: https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction Install the @nuxtjs/seo package to bundle core Nuxt SEO modules with a single command. ```bash npx nuxt module add @nuxtjs/seo ``` -------------------------------- ### Install Nuxt AI Ready CLI Source: https://nuxtseo.com/docs/ai-ready/guides/cli Run the Nuxt AI Ready CLI using npx. This command is available after installing the module. ```bash npx nuxt-ai-ready ``` -------------------------------- ### Install Upstash Redis Client Source: https://nuxtseo.com/docs/skew-protection/guides/storage-configuration Install the Upstash Redis client for serverless deployments using a Redis-compatible HTTP API. ```bash npx nypm add @upstash/redis ``` -------------------------------- ### Install Nuxt SEO RC Source: https://nuxtseo.com/docs/nuxt-seo/migration-guide/beta-to-rc Remove the beta package and install the RC version using your preferred package manager. ```sh pnpm remove @nuxtseo/module && pnpm i -D @nuxtjs/seo ``` ```bash yarn remove @nuxtseo/module && yarn add -D @nuxtjs/seo ``` ```bash npm remove @nuxtseo/module && npm install -D @nuxtjs/seo ``` -------------------------------- ### Install Sharp for Image Processing Source: https://nuxtseo.com/docs/seo-utils/guides/cli The CLI relies on the 'sharp' package for image manipulation. Install it as a development dependency to enable icon generation. ```bash pnpm add -D sharp ``` -------------------------------- ### Install Nuxt AI Ready Module Source: https://nuxtseo.com/docs/nuxt-seo/getting-started/installation Install the Nuxt AI Ready module for AI & LLM discoverability, which generates essential AI directive files. ```bash npx nuxi module add nuxt-ai-ready ``` -------------------------------- ### Example Robots.txt File Structure Source: https://nuxtseo.com/docs/robots/guides/robots-txt Demonstrates various locations where a robots.txt file can be placed within a Nuxt project structure. ```bash # root directory robots.txt # asset folders assets/ ├── robots.txt # pages folder pages/ ├── robots.txt ├── _dir/ │ └── robots.txt # public folder public/ ├── _robots.txt ├── _dir/ │ └── robots.txt ``` -------------------------------- ### Install Nuxt Skew Protection v1 with npm Source: https://nuxtseo.com/docs/skew-protection/releases/v1 Install the latest version of Nuxt Skew Protection using npm. ```bash npm install nuxt-skew-protection@^1 ``` -------------------------------- ### Install Nuxt SEO Source: https://nuxtseo.com/docs/nuxt-seo/migration-guide/nuxt-seo-kit Remove the old nuxt-seo-kit package and install the new @nuxtjs/seo package using your preferred package manager. ```sh pnpm remove nuxt-seo-kit && pnpm i -D @nuxtjs/seo ``` ```bash yarn remove nuxt-seo-kit && yarn add -D @nuxtjs/seo ``` ```bash npm remove nuxt-seo-kit && npm install -D @nuxtjs/seo ``` -------------------------------- ### Robots.txt Example File Structure Source: https://nuxtseo.com/docs/robots/releases/v3 Demonstrates the file structure for using a public/_robots.txt file to configure the Nuxt Robots module. ```bash public/_robots.txt ``` -------------------------------- ### Install Nuxt Robots Module Source: https://nuxtseo.com/docs/skew-protection/getting-started/installation Install the @nuxtjs/robots module, which is a requirement for Nuxt Skew Protection. ```bash npx nuxi module add @nuxtjs/robots ``` -------------------------------- ### Install Nuxt SEO Alias Source: https://nuxtseo.com/docs/nuxt-seo/getting-started/installation Use this command to install the main Nuxt SEO alias module, which bundles core SEO functionalities. ```bash npx nuxi module add @nuxtjs/seo ``` -------------------------------- ### Install Nuxt Skew Protection v1 with yarn Source: https://nuxtseo.com/docs/skew-protection/releases/v1 Install the latest version of Nuxt Skew Protection using yarn. ```bash yarn add nuxt-skew-protection@^1 ``` -------------------------------- ### Install Nuxt Skew Protection v1 with pnpm Source: https://nuxtseo.com/docs/skew-protection/releases/v1 Install the latest version of Nuxt Skew Protection using pnpm. ```bash pnpm add nuxt-skew-protection@^1 ``` -------------------------------- ### Install better-sqlite3 for Node.js Source: https://nuxtseo.com/docs/ai-ready/getting-started/installation When using Node.js with the default SQLite database, install the `better-sqlite3` package. Deployments on Bun, Cloudflare D1, or Vercel Neon Postgres do not require this. ```bash pnpm add better-sqlite3 ``` -------------------------------- ### Blog Layout Breadcrumb Setup Source: https://nuxtseo.com/docs/seo-utils/api Initial setup for breadcrumbs in a blog layout, defining a root segment and an initial override. ```vue ``` -------------------------------- ### Example Nuxt Content Markdown Output Source: https://nuxtseo.com/docs/ai-ready/guides/markdown Example of markdown content served from a Nuxt Content collection, including frontmatter. ```markdown --- title: "Hello World" description: "A post served from @nuxt/content source markdown." canonical_url: "https://example.com/blog/hello-world" last_updated: "2026-04-25T03:43:31.143Z" --- # Hello from Nuxt Content ... ``` -------------------------------- ### Install Nuxt SEO Utils Package Source: https://nuxtseo.com/docs/seo-utils/getting-started/installation Use this command to add the nuxt-seo-utils package to your project dependencies. ```bash npx skilld add nuxt-seo-utils ``` -------------------------------- ### Install Nuxt Sitemap Module Source: https://nuxtseo.com/docs/sitemap/getting-started/installation Install the @nuxtjs/sitemap package using npm or yarn. This is the first step to integrating sitemap generation into your Nuxt project. ```bash npm install @nuxtjs/sitemap yarn add @nuxtjs/sitemap ``` -------------------------------- ### Add Nuxt Content Module Source: https://nuxtseo.com/docs/ai-ready/guides/markdown Install the @nuxt/content module to integrate Nuxt Content for serving source markdown. ```bash npx nuxi@latest module add @nuxt/content ``` -------------------------------- ### Nuxt i18n Configuration Example Source: https://nuxtseo.com/docs/site-config/guides/i18n Example of configuring the i18n module in `nuxt.config.ts`, including base URL and locale definitions. ```typescript export default defineNuxtConfig({ i18n: { baseUrl: 'https://example.com', defaultLocale: 'en', locales: [ { code: 'en', language: 'en-US' }, { code: 'fr', language: 'fr-FR' }, ], }, }) ``` -------------------------------- ### Example robots.txt Content Source: https://nuxtseo.com/docs/robots/getting-started/installation This is an example of a minimal robots.txt file that allows all search engines to index the site. It's typically used in production environments. ```robots-txt User-agent: * Disallow: ``` -------------------------------- ### LocalBusiness Schema Example Source: https://nuxtseo.com/docs/schema-org/guides/setup-identity Configure a local business schema with name, logo, and social media links. ```typescript export default defineNuxtConfig({ schemaOrg: { identity: { type: 'LocalBusiness', name: 'Coffee Shop', logo: '/logo.png', sameAs: [ 'https://x.com/coffee_shop', 'https://www.facebook.com/coffee_shop', 'https://www.yelp.com/coffee_shop' ] } } }) ``` -------------------------------- ### Install Nuxt Skew Protection Module Source: https://nuxtseo.com/docs/nuxt-seo/getting-started/installation Install the Nuxt Skew Protection module to manage version skews with persistent assets and instant updates. ```bash npx nuxi module add nuxt-skew-protection ``` -------------------------------- ### System Environment Variable Source: https://nuxtseo.com/docs/site-config/guides/how-it-works Example of accessing the Node.js environment variable for build time configuration. ```typescript export default { env: process.env.NODE_ENV, } ``` -------------------------------- ### Organization Schema Example Source: https://nuxtseo.com/docs/schema-org/guides/setup-identity Configure your organization's schema with name, logo, and social media links. ```typescript export default defineNuxtConfig({ schemaOrg: { identity: { type: 'Organization', name: 'NuxtJS', logo: '/logo.png', sameAs: [ 'https://x.com/nuxt_js', 'https://www.linkedin.com/showcase/nuxt-framework/', 'https://github.com/nuxt' ] } } }) ``` -------------------------------- ### Alternate Text File Example Source: https://nuxtseo.com/docs/seo-utils/guides/open-graph-images Shows how to provide alternate text for an Open Graph image using a separate .txt file. ```text This is the alternate text for my image. ``` -------------------------------- ### robots.txt Syntax Example Source: https://nuxtseo.com/docs/robots/guides/ai-directives Defines the general syntax for Content-Signal directives in robots.txt, specifying categories and their allowed values. ```txt User-agent: * Content-Signal: =[, =] Content-Signal: /path/ =[, =] ``` -------------------------------- ### Robots.txt with AI Directives Source: https://nuxtseo.com/docs/robots/guides/robots-txt Example robots.txt content demonstrating the use of Content-Usage and Content-Signal directives for AI control. ```robots.txt User-agent: * Allow: / Content-Usage: bots=y, train-ai=n Content-Signal: ai-train=no, search=yes ``` -------------------------------- ### search_pages Tool Response Example Source: https://nuxtseo.com/docs/ai-ready/guides/mcp Example JSON response from the `search_pages` tool, returning search results with route, title, description, and relevance score. ```json [ { "route": "/docs/installation", "title": "Installation", "description": "Install the module", "score": 0.15 } ] ``` -------------------------------- ### list_pages Tool Response Example Source: https://nuxtseo.com/docs/ai-ready/guides/mcp Example JSON response from the `list_pages` tool, showing metadata for pages on the site, including route, title, description, headings, and update timestamp. ```json { "pages": [ { "route": "/docs/getting-started", "title": "Getting Started", "description": "Quick start guide", "headings": "h1:Getting Started|h2:Installation", "updatedAt": "2025-01-15T10:30:00Z" } ], "total": 50, "limit": 100, "offset": 0, "hasMore": false } ``` -------------------------------- ### Twitter Image File Structure Example Source: https://nuxtseo.com/docs/seo-utils/guides/open-graph-images Illustrates the file structure for automatically generating Twitter image meta tags. ```dir pages/ ├── index.vue ├── about/ │ ├── index.vue │ └── twitter-image.png ``` -------------------------------- ### Person Schema Example Source: https://nuxtseo.com/docs/schema-org/guides/setup-identity Configure your personal schema with name, image, and social media links. ```typescript export default defineNuxtConfig({ schemaOrg: { identity: { type: 'Person', name: 'Harlan Wilton', image: '/profile.jpg', sameAs: [ 'https://x.com/harlan_zw', 'https://github.com/harlan-zw', 'https://harlanzw.com' ] } } }) ``` -------------------------------- ### Default SQLite Database Configuration Source: https://nuxtseo.com/docs/ai-ready/api/config Configure the database to use SQLite with a specified filename. This is the default setup. ```typescript export default defineNuxtConfig({ aiReady: { database: { filename: '.data/ai-ready/pages.db' } } }) ``` -------------------------------- ### Basic Nuxt AI Ready Configuration Source: https://nuxtseo.com/docs/ai-ready/api/config This is the basic setup for the Nuxt AI Ready module in your nuxt.config.ts file. ```typescript export default defineNuxtConfig({ aiReady: { // options } }) ``` -------------------------------- ### Route-Based Protection Logic Source: https://nuxtseo.com/docs/skew-protection/guides/performance Implement route-based logic using computed properties and conditional rendering to protect specific routes. This example defines a list of protected routes and checks if the current path starts with any of them. ```vue ``` -------------------------------- ### Blog Post Schema.org Source: https://nuxtseo.com/docs/schema-org/guides/content Example of frontmatter for a blog post, defining it as a `BlogPosting` with headline, author, and publication date. ```markdown --- title: 'My Blog Post' schemaOrg: - "@type": "BlogPosting" headline: "How to Use Our Product" author: "@type": "Person" name: "Jane Smith" datePublished: "2023-10-01" --- ``` -------------------------------- ### Add MCP Toolkit Module Source: https://nuxtseo.com/docs/ai-ready/getting-started/installation Install the `@nuxtjs/mcp-toolkit` module to connect AI agents to your site via the Model Context Protocol. ```bash npx nuxi module add @nuxtjs/mcp-toolkit ``` -------------------------------- ### Lazy Connection Mode for Fine-Grained Control Source: https://nuxtseo.com/docs/skew-protection/guides/performance Use `lazy: true` with `useSkewProtection()` to prevent auto-connection and manually control connection establishment. This example demonstrates connecting only when a user starts the checkout process and disconnecting before leaving the route. ```vue ``` -------------------------------- ### Modify Site Config with `site-config:init` Hook Source: https://nuxtseo.com/docs/site-config/nitro-api/nitro-hooks Use the `site-config:init` hook to modify the site configuration after initialization. This example shows how to add a French site configuration if the request origin starts with 'https://fr.'. Ensure you have the necessary composables imported. ```typescript import { getNitroOrigin } from '#site-config/server/composables' export default defineNitroPlugin((nitroApp) => { nitroApp.hooks.hook('site-config:init', ({ event, siteConfig }) => { const origin = getNitroOrigin(event) if (origin.startsWith('https://fr.')) { siteConfig.push({ _context: 'french nitro plugin', // helps you debug name: 'Mon Site', url: 'https://fr.example.com', }) } }) }) ``` -------------------------------- ### Example File Structure for Metadata Files Source: https://nuxtseo.com/docs/seo-utils/releases/v3 Demonstrates how to structure your project files to leverage Next.js inspired metadata files for SEO. Place images within a `_dir` folder inside your `pages` directory. ```dir pages/ ├── about/ │ ├── index.vue │ └── _dir/ │ ├── og-image.png │ ├── og-image.txt │ ├── twitter-image.png │ └── twitter-image.txt public/ └── logo.png ``` -------------------------------- ### Runtime Sync Workflow Diagram Source: https://nuxtseo.com/docs/ai-ready/guides/runtime-indexing Illustrates the difference between the default prerendering process and the opt-in runtime sync for dynamic content. ```text ┌─────────────────────────────────────────────────────────────┐ │ Default: Prerendering (source of truth) │ │ Build time → crawl sitemap → create SQLite → compress │ │ Cold start → restore dump → llms.txt works immediately! │ ├─────────────────────────────────────────────────────────────┤ │ Opt-in: Runtime Sync (for dynamic content) │ │ Cold start → restore dump → sitemap seeder → poll │ │ Cron (optional) → background re-indexing of stale pages │ └─────────────────────────────────────────────────────────────┘ ``` -------------------------------- ### Translated Site Config in JSON Source: https://nuxtseo.com/docs/site-config/guides/i18n Example of providing translated site name and description using a `nuxtSiteConfig` key in a JSON locale file. ```json { "nuxtSiteConfig": { "name": "My Site", "description": "My site description" } } ``` -------------------------------- ### Robots.txt Example for Disabled Indexing Source: https://nuxtseo.com/docs/robots/guides/disable-indexing This is an example of a `robots.txt` file that disallows all bots from crawling any part of the site. ```robots User-agent: * Disallow: / ``` -------------------------------- ### Open Graph Image File Structure Example Source: https://nuxtseo.com/docs/seo-utils/guides/open-graph-images Demonstrates the file structure for automatically generating Open Graph image meta tags. ```dir pages/ ├── index.vue ├── about/ │ ├── index.vue │ └── og-image.png ``` -------------------------------- ### Allow Documentation Training with Content-Usage Source: https://nuxtseo.com/docs/robots/guides/ai-directives Configure Content-Usage to allow AI training specifically for documentation paths while blocking it elsewhere. ```robots.txt User-agent: * Allow: / Content-Usage: train-ai=n Content-Usage: /docs/ train-ai=y ``` -------------------------------- ### Satori Renderer Component Example Source: https://nuxtseo.com/docs/og-image/renderers Use the Satori renderer for good CSS support. Ensure your component filename includes '.satori.vue'. Requires 'satori' and '@resvg/resvg-js' peer dependencies. ```bash components/OgImage/MyTemplate.satori.vue ``` -------------------------------- ### Takumi Renderer Component Example Source: https://nuxtseo.com/docs/og-image/renderers Use the Takumi renderer for optimal performance and full CSS support. Ensure your component filename includes '.takumi.vue'. ```bash components/OgImage/MyTemplate.takumi.vue ``` -------------------------------- ### Using _dir Folder for Multiple Images Source: https://nuxtseo.com/docs/seo-utils/guides/open-graph-images Example file structure demonstrating the use of a `_dir` folder to organize multiple Open Graph and Twitter images for a single route. ```dir pages/ ├── index.vue ├── about/ │ ├── index.vue │ └── _dir/ │ ├── og-image.png │ ├── og-image.alt.txt │ ├── twitter-image.png │ └── twitter-image.alt.txt ``` -------------------------------- ### Install Nuxt Link Checker Module Source: https://nuxtseo.com/docs/link-checker/getting-started/installation Use this command to install the Nuxt Link Checker module as a dependency for your Nuxt.js project. ```bash npx skilld add nuxt-link-checker ``` -------------------------------- ### Configure Sitemap with Chunking Source: https://nuxtseo.com/docs/sitemap/api/config Example of configuring a sitemap named 'products' to use data sources and enable chunking with a custom size of 5000 URLs per file. ```typescript export default defineNuxtConfig({ sitemap: { sitemaps: { products: { sources: ['/api/products'], chunks: 5000 // Split into files with 5000 URLs each } } } }) ``` -------------------------------- ### Turso/LibSQL Database Configuration Source: https://nuxtseo.com/docs/ai-ready/api/config Configure the database to use Turso or LibSQL, providing the database URL and authentication token via environment variables. ```typescript export default defineNuxtConfig({ aiReady: { database: { type: 'libsql', url: process.env.TURSO_URL, authToken: process.env.TURSO_AUTH_TOKEN } } }) ``` -------------------------------- ### Dynamic Page Breadcrumb Setup (Category) Source: https://nuxtseo.com/docs/seo-utils/api Setup breadcrumbs for a dynamic category page, overriding the second segment with fetched category data. ```vue ``` ```vue ``` -------------------------------- ### Block AI Training, Allow Search in robots.txt Source: https://nuxtseo.com/docs/robots/guides/ai-directives Example robots.txt configuration to block AI training while permitting search indexing for all user agents. ```txt User-agent: * Allow: / Content-Signal: ai-train=no, search=yes ``` -------------------------------- ### Set Environment-Specific Site Config with Environment Variables Source: https://nuxtseo.com/docs/site-config/guides/setting-site-config Configure your site for different environments (e.g., staging, testing) by setting environment variables. This method is recommended when you have multiple deployment environments. ```bash NUXT_SITE_URL=https://test.example.com NUXT_SITE_NAME="STAGING SITE NAME" NUXT_SITE_ENV="staging" ``` -------------------------------- ### Manual ESLint Setup Source: https://nuxtseo.com/docs/link-checker/releases/v5 Shows how to manually configure Nuxt Link Checker ESLint rules in your ESLint configuration file. This is an alternative to automatic registration when not using `@nuxt/eslint`. ```js import linkCheckerPlugin from 'nuxt-link-checker/eslint' export default [ { files: ['**/*.vue', '**/*.ts'], plugins: { 'link-checker': linkCheckerPlugin, }, rules: { 'link-checker/valid-route': 'error', 'link-checker/valid-sitemap-link': 'warn', }, }, ] ``` -------------------------------- ### Configure Site URL and Indexability with nuxt-site-config Source: https://nuxtseo.com/docs/robots/releases/v3 Demonstrates how to configure the site URL and indexability using the nuxt-site-config module, which is now the preferred method for Nuxt Robots. ```typescript export default defineNuxtConfig({ site: { url: 'https://example.com', indexable: true } }) ``` -------------------------------- ### Get Runtime Origin URL Source: https://nuxtseo.com/docs/site-config/api/get-nitro-origin Import and use `getNitroOrigin` to get the site's runtime origin. This is useful when the canonical URL is not explicitly set. ```typescript import { getNitroOrigin } from '#imports' const origin = getNitroOrigin() // https://www.example.com/ ``` -------------------------------- ### Default Title Template Example Source: https://nuxtseo.com/docs/seo-utils/guides/fallback-title Nuxt SEO applies a default title template like '%s %separator %siteName'. This example shows the equivalent `useHead` configuration. ```typescript // equivalent of what the module does useHead({ titleTemplate: '%s %separator %siteName', }) ``` -------------------------------- ### Get Fallback Title Source: https://nuxtseo.com/docs/seo-utils/api/fallback-title Use the auto-imported useFallbackTitle composable to get a computed ref of the fallback title. Returns null for the root path if no meta title is set. ```typescript const title = useFallbackTitle() // Ref ``` -------------------------------- ### Basic Sitemap Source Implementation Source: https://nuxtseo.com/docs/sitemap/advanced/chunking-sources Implement a basic endpoint for sitemap sources that fetches and maps product data to the required format for sitemap generation. ```typescript export default defineEventHandler(async () => { const products = await db.products.findAll({ select: ['id', 'slug', 'updatedAt'] }) return products.map(product => ({ loc: `/products/${product.slug}`, lastmod: product.updatedAt })) }) ``` -------------------------------- ### ESLint Error Example for Invalid Route Source: https://nuxtseo.com/docs/nuxt-seo/releases/v5 This is an example of the output from the `link-checker/valid-route` ESLint rule when a relative URL in your code does not match any known routes, providing a 'did you mean?' suggestion. ```text error Link "/abut" does not match any known route. Did you mean "/about"? link-checker/valid-route ``` -------------------------------- ### Nuxt Content Frontmatter Example Source: https://nuxtseo.com/docs/nuxt-seo/guides/nuxt-content Example of frontmatter configuration for a Nuxt Content page, including title, description, OG image settings, sitemap, robots, and schema.org markup. ```markdown --- title: "Hello World Page" description: "The purpose of this page is to say 'hello!' to the world." ogImage: component: HelloWorld props: title: "Hello World" description: "This is a description" sitemap: lastmod: 2025-01-01 robots: index, nofollow schemaOrg: - "@type": "BlogPosting" headline: "How to Use Our Product" author: type: "Person" name: "Jane Smith" datePublished: "2023-10-01" --- # {{$doc.title}} {{ $doc.description}} ``` -------------------------------- ### Dynamic Page Breadcrumb Setup (Post) Source: https://nuxtseo.com/docs/seo-utils/api Setup breadcrumbs for a dynamic post page, overriding the third segment with fetched post data. Render breadcrumbs in the page component. ```vue ``` -------------------------------- ### Configure Runtime Sync with Options Source: https://nuxtseo.com/docs/ai-ready/api/config Opt-in runtime sync for dynamic content sites with custom TTL, batch size, and prune TTL. This configuration also enables cron and sets a runtime sync secret. ```typescript export default defineNuxtConfig({ aiReady: { runtimeSync: { ttl: 3600, batchSize: 20, pruneTtl: 604800 // prune after 7 days }, runtimeSyncSecret: process.env.AI_READY_SECRET, cron: true // enable scheduled indexing } }) ``` -------------------------------- ### Install Nuxt Site Config in a Module Source: https://nuxtseo.com/docs/site-config/getting-started/installation Integrate Nuxt Site Config into your Nuxt module using the install function. Optionally, update site configuration from your module's options. ```typescript import { installNuxtSiteConfig, updateSiteConfig } from 'nuxt-site-config/kit' export default defineNuxtModule({ // ... async setup(options) { await installNuxtSiteConfig() // Optional: set some site config from your modules options // This is not recommended, only to keep supporting your modules options updateSiteConfig({ _context: 'my-module', url: options.siteUrl, }) } }) ``` -------------------------------- ### Configure Multi-Tenancy Source: https://nuxtseo.com/docs/site-config/api/config Set up multiple sites with distinct configurations based on hostnames. Each entry requires an array of hosts and the corresponding site configuration. ```typescript export default defineNuxtConfig({ site: { multiTenancy: [ { hosts: ['www.example.com', 'example.com', 'local.example.com'], config: { name: 'Example', description: 'Example description', url: 'example.com', defaultLocale: 'en', currentLocale: 'en', }, }, { hosts: ['www.foo.com', 'foo.com', 'local.foo.com'], config: { url: 'foo.com', name: 'Foo', description: 'Foo description', }, }, ] } }) ``` -------------------------------- ### Manual SEO Setup with Trailing Slashes Source: https://nuxtseo.com/docs/nuxt-seo/guides/trailing-slashes Manually configure NuxtLink trailing slashes, route redirects, and canonical URLs without Nuxt SEO. This approach requires configuration in nuxt.config.ts and per-page script setup. ```typescript export default defineNuxtConfig({ // 1. NuxtLink trailing slashes experimental: { defaults: { nuxtLink: { trailingSlash: 'append' } } }, // 2. Redirects for wrong format routeRules: { // Redirect /about to /about/ '/about': { redirect: '/about/' }, '/blog': { redirect: '/blog/' } // ... every route } }) ``` ```javascript ``` -------------------------------- ### Get Fallback Page Title Source: https://nuxtseo.com/docs/seo-utils/releases/v8 Use the `useFallbackTitle()` composable to get a default page title based on route metadata, i18n keys, or URL segments. This ensures pages without explicit titles have a reasonable fallback. ```typescript const title = useFallbackTitle() // /about-us → "About Us" // 404 page → "404 - Page not found" ``` -------------------------------- ### Invalid link text example Source: https://nuxtseo.com/docs/link-checker/guides/rules Demonstrates non-descriptive link text that should be avoided for accessibility. ```html click here ``` -------------------------------- ### Product Page Schema.org Source: https://nuxtseo.com/docs/schema-org/guides/content Frontmatter configuration for a product page, defining it as a `Product` with name, description, and offer details. ```markdown --- title: 'Product' schemaOrg: - "@type": "Product" name: "Product XYZ" description: "A high-quality product that meets your needs." offers: "@type": "Offer" price: "29.99" priceCurrency: "USD" --- ``` -------------------------------- ### Allow Documentation Training with Content-Signal Source: https://nuxtseo.com/docs/robots/guides/ai-directives Configure Content-Signal to allow AI training for documentation paths, indicating explicit consent for this content. ```robots.txt User-agent: * Allow: / Content-Signal: ai-train=no Content-Signal: /docs/ ai-train=yes ``` -------------------------------- ### Remove useSeoKit() Composable Source: https://nuxtseo.com/docs/nuxt-seo/migration-guide/nuxt-seo-kit In v2, the `useSeoKit()` composable is removed. Delete it from your script setup. ```diff ``` -------------------------------- ### getSiteRobotConfig() Source: https://nuxtseo.com/docs/robots/nitro-api/get-site-robot-config Retrieves the site-wide robots configuration to check if the site is indexable and get reasons why. ```APIDOC ## getSiteRobotConfig() ### Description Retrieves the site-wide robots configuration to determine if the site is indexable and the reasons for its indexability status. ### Method `getSiteRobotConfig(e: H3Event): { indexable: boolean, hints: string[] }` ### Parameters #### Arguments - **e** (H3Event) - Required - The event object. ### Returns - **indexable** (boolean) - Whether the site is indexable. - **hints** (string[]) - A list of hints as to why the site is or isn't indexable. ### Example ```ts [server/routes/og.png.ts] import { getSiteRobotConfig } from '#imports' export default defineEventHandler((e) => { const { indexable } = getSiteRobotConfig(e) // avoid serving og images if the site is not indexable if (!indexable) { // ... } }) ``` ``` -------------------------------- ### ESLint Configuration Options Source: https://nuxtseo.com/docs/link-checker/guides/eslint Shows how to configure options for the `link-checker/valid-route` ESLint rule, including specifying the routes file and the project root directory. ```json { "link-checker/valid-route": ["error", { "routesFile": "/path/to/routes.json", "rootDir": "/path/to/project" }] } ``` -------------------------------- ### Configure Claude Desktop for MCP Source: https://nuxtseo.com/docs/ai-ready/getting-started/installation Add your site as an MCP server in the Claude Desktop configuration file. This allows Claude to connect to your local development server. ```json { "mcpServers": { "my-site": { "command": "npx", "args": ["-y", "@nuxtjs/mcp-client", "http://localhost:3000/mcp"] } } } ``` -------------------------------- ### Install MCP Server for Nuxt SEO Source: https://nuxtseo.com/docs/nuxt-seo/guides/mcp Use this command to add the Nuxt SEO MCP server for HTTP transport. This enables AI assistants to connect to the documentation. ```bash claude mcp add --transport http nuxt-seo https://nuxtseo.com/mcp ``` -------------------------------- ### Production Deployment Indexing Source: https://nuxtseo.com/docs/ai-ready/guides/cli After deploying your site, use this command to index all pages with a specified URL. ```bash npx nuxt-ai-ready poll --all --url https://mysite.com ```