Technical SEO & Schema.org

Configure @nuxtjs/seo, per-page frontmatter SEO controls, automatic Schema.org JSON-LD, and sitemap exclusions.

Built-In @nuxtjs/seo Integration

@nuxtify/cms bundles @nuxtjs/seo v5 as a module dependency, giving every site automatic robots.txt, sitemap.xml, site configuration, and Schema.org JSON-LD out of the box.

Set your canonical site metadata in nuxt.config.ts:

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/content', '@nuxtify/cms'],

  site: {
    url: 'https://example.com',
    name: 'Acme',
    description: 'Build and launch faster with Acme.',
  },
})

Even if you only configure nuxtify.brand (name, domain, tagline, logo), @nuxtify/cms registers a low-priority brandFallback plugin that populates SiteConfig and your Schema.org Organization identity automatically without overriding an explicit site or schemaOrg.identity block.

Per-Page SEO Frontmatter (createSeoSchema)

Every built-in CMS schema merges createSeoSchema('<collectionName>'), which adds typed frontmatter fields from @nuxtjs/seo directly to your Markdown files and registers a runtime @nuxtjs/sitemap collection filter for drafts and future publishedAt items:

---
title: Pricing
description: Simple, transparent pricing for teams of all sizes.
publishedAt: 2026-02-01T00:00:00Z
robots: index, follow
sitemap:
  changefreq: monthly
  priority: 0.8
schemaOrg:
  - '@type': WebPage
    name: Acme Pricing
---

You can also disable indexing or sitemap inclusion for an individual page:

---
title: Thank You
description: Confirmation page after form submission.
publishedAt: 2026-02-01T00:00:00Z
robots: false
sitemap: false
---

For custom collections, call createSeoSchema('<collectionName>', options?) from @nuxtify/cms/content to get the same SEO frontmatter fields and runtime sitemap filtering. See Content Schemas for all options.

Automatic Schema.org Structured Data

Built-in @nuxtify/cms routes and components register structured JSON-LD automatically—no manual <script type="application/ld+json"> tags required:

  • Articles & Notes (useArticleSchema): Emits Article (default for articles), BlogPosting (default for notes), or your chosen schemaType, complete with headline, description, datePublished, dateModified, image, wordCount, articleSection, keywords, linked Person author data (from contributors), and BreadcrumbList.
  • Documentation (useDocSchema): Emits TechArticle by default (configurable via content.docs.schemaType or per-page schemaType) plus BreadcrumbList, without requiring publishedAt or author.
  • Pages, Topics, and Indexes (useContentPageSchema): Emits WebPage (or CollectionPage / custom @type) plus BreadcrumbList.
  • FAQ Blocks (::PageFaq): Automatically emits FAQPage and Question / Answer JSON-LD nodes with Markdown stripped to clean plain text.

Choosing a schemaType

Articles, notes, and docs accept any value from articleSchemaTypeEnum:

  • 'Article'
  • 'BlogPosting'
  • 'NewsArticle'
  • 'TechArticle'
  • 'SocialMediaPosting'

Set a collection-wide default in nuxt.config.ts (for example, nuxtifyCms.content.articles.schemaType) or override it per document in frontmatter:

---
title: Release 2.0 Announcement
publishedAt: 2026-04-01T12:00:00Z
author: jane-doe
schemaType: NewsArticle
---

If you provide a custom schemaOrg block in frontmatter, @nuxtify/cms respects your override and still appends BreadcrumbList automatically unless your custom block already defines one.

Using Schema Composables on Custom Pages

When you add a custom collection (like useCases), call useContentPageSchema on your custom detail or index page so it gets the same structured data treatment:

<!-- app/pages/use-cases/[slug].vue -->
<script setup lang="ts">
useContentPageSchema(page, {
  breadcrumbs: [
    { title: 'Home', to: '/' },
    { title: 'Use Cases', to: '/use-cases' },
  ],
})
</script>

Automatic Sitemap Exclusions & Route Prefixes

@nuxtify/cms keeps your sitemap.xml accurate automatically:

  • Disabled collections: Any collection with enabled: false in nuxt.config.ts has its route prefix and child paths added to sitemap.exclude and its parsed items marked sitemap: false.
  • Custom routePrefix: Parsed items automatically map sitemap.loc to your configured routePrefix (such as /blog/my-post instead of /articles/my-post).
  • Drafts: In production builds, draft: true items receive sitemap: false and robots: false during parsing (content:file:afterParse) and are also excluded by createSeoSchema's sitemap filter.
  • Scheduled content: Future publishedAt items keep their normalized sitemap.loc during parsing and are excluded dynamically at runtime by createSeoSchema's default @nuxtjs/sitemap collection filter until publishedAt <= Date.now().
  • Navigation metadata: .navigation.yml files inside content/docs/ are automatically excluded from sitemaps and search indexing.

For static or prerendered sites, you can add sitemap: { zeroRuntime: true } in nuxt.config.ts to bake sitemap.xml at build time and reduce runtime bundle size.

Open Graph Images (ogImage)

Next Steps