github harlan-zw/nuxt-seo v5.0.0

latest releases: v5.0.2, v5.0.1
5 hours ago

Nuxt SEO v5 bumps every sub-module to a new major version (except OG Image, which stays on v6). The common thread is the Site Config v4 dependency; addressing those changes first will make the rest of the migration smooth.

For step-by-step upgrade instructions, see the v4 to v5 migration guide.

🛠️ DevTools Unity

image

The biggest change in v5 is that every Nuxt SEO module now shares a single DevTools foundation through our new shared DevTools layer (nuxtseo-layer-devtools).

Previously each module shipped its own DevTools client with inconsistent layouts, patterns, and capabilities. In v5, all DevTools clients extend a common Nuxt layer that provides:

  • Consistent layout and navigation across every module, with a module switcher to jump between them
  • Setup checklist that validates your configuration across all installed modules, flagging required and recommended actions
  • Built-in troubleshooting, update indicators, and production mode preview in every module
image

Nuxt SEO Utils gets a brand new DevTools client for the first time, and the DevTools for Robots, Sitemap, Schema.org, and Link Checker have all been revamped to use the shared layer.

image

🔗 ESLint Link Checking

Nuxt Link Checker v5 ships an ESLint integration with zero-config @nuxt/eslint support:

  • link-checker/valid-route (error): validates relative URLs match known routes with "did you mean?" suggestions
  • link-checker/valid-sitemap-link (warn): checks URLs exist in the sitemap
  • Scans Vue templates, TS/JS (navigateTo, router.push), and Markdown links

If you're using @nuxt/eslint, the rules are registered automatically. Otherwise, add them manually:

import linkChecker from 'nuxt-link-checker/eslint'

export default [
  linkChecker,
]

Example output when a link doesn't match any route:

error  Link "/abut" does not match any known route. Did you mean "/about"?  link-checker/valid-route

📱 Social Share Links

SEO Utils v8 introduces useShareLinks(), a composable for generating social sharing URLs (Twitter, Facebook, LinkedIn, WhatsApp, Telegram, Reddit, Pinterest, Email) with built-in UTM tracking.

<script setup lang="ts">
const links = useShareLinks({
  title: 'Check out Nuxt SEO v5!',
  twitter: { via: 'harlodev', hashtags: ['nuxt', 'seo'] },
  utm: { campaign: 'v5-launch' },
})
</script>

<template>
  <nav>
    <a :href="links.twitter">Share on X</a>
    <a :href="links.linkedin">Share on LinkedIn</a>
    <a :href="links.reddit">Share on Reddit</a>
  </nav>
</template>

🖼️ Favicon Generation CLI

New nuxt-seo-utils icons CLI command generates all favicon and icon variants from a single source image:

npx nuxt-seo-utils icons --source logo.svg

This generates favicon.ico, apple-touch-icon.png (180x180), and PNG icons at 16, 32, 192, and 512px from your source image in public/. Requires sharp as a dev dependency.

⚡ Inline Minification

SEO Utils v8 automatically minifies inline scripts and styles injected via useHead.

Before (what you write):

useHead({
  script: [{
    innerHTML: `
      // Track page view
      window.dataLayer = window.dataLayer || [];
      window.dataLayer.push({
        'event': 'page_view',
        'page_path': window.location.pathname
      });
    `,
  }],
  style: [{
    innerHTML: `
      /* Critical above-the-fold styles */
      .hero {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
      }
    `,
  }],
})

After (rendered HTML):

<script>window.dataLayer=window.dataLayer||[];window.dataLayer.push({event:"page_view",page_path:window.location.pathname});</script>
<style>.hero{display:flex;align-items:center;justify-content:center;min-height:100vh}</style>

📄 definePageMeta Sitemap Config

Sitemap v8 lets you configure sitemap options directly in definePageMeta:

<script setup lang="ts">
definePageMeta({
  sitemap: {
    changefreq: 'daily',
    priority: 0.8,
  },
})
</script>

🌐 i18n Multi-Sitemap Improvements

Custom sitemaps are now auto-expanded per locale when using i18n multi-sitemap mode.

🐛 Debug Production Endpoints

Several modules now expose debug endpoints in production:

  • Robots: /__robots__/debug-production.json
  • Sitemap: /__sitemap__/debug-production.json
  • SEO Utils: /__nuxt-seo-utils

🏷️ Site Config Priority Constants

Named priority constants are now available via SiteConfigPriority.runtime, etc.

⚠️ Breaking Changes

All modules now depend on Site Config v4, which removes implicit site name inference, legacy site* runtime config keys, and several deprecated server-side APIs. Several Content v3 composables have also been renamed (e.g. asSitemapCollection()defineSitemapSchema()).

See the migration guide for the full list of breaking changes and how to address them.

🐞 Bug Fixes

SSR Memory Leaks Fixed

  • Schema.org: reactive scopes not being disposed
  • Site Config: computed refs in i18n plugin

i18n Fixes

  • Sitemap: base URL in multi-sitemap redirect, exclude filters with base URL/i18n prefixes, respect `autoI18n: false
  • SEO Utils: resolve fallback page titles from translation keys

Other Fixes

  • Schema.org: @id URLs now respect app.baseURL, Nuxt context preserved in computed refs
  • Robots: skipSiteIndexable now skips Disallow: / rules, route rules nullish guard
  • SEO Utils: error pages preserve user-defined titles, useServerSeoMeta takes precedence over site defaults
  • Sitemap: chunked sitemaps path resolution, Content v3 .navigation path filtering
  • Link Checker: serialize RegExp in excludeLinks for client-side filtering

📚 Live Examples

Every module now ships standalone examples in its repository. These are real Nuxt apps that stay in sync with the latest code, so they always reflect the current API.

Open any example directly in StackBlitz:

Module Examples
Robots basic, i18n, custom-rules
Sitemap basic, i18n, dynamic-urls
OG Image basic-satori, basic-takumi, content, i18n
Schema.org basic, blog, e-commerce
Link Checker basic, broken-links, skip-inspection
SEO Utils basic, breadcrumbs, meta-tags
Site Config basic, env-driven, multi-site

Because examples live alongside each module's source, they are always tested against the latest version and never fall out of date.

Module Version Summary

Module v4 v5
nuxt-site-config v3 v4
nuxt-seo-utils v7 v8
@nuxtjs/sitemap v7 v8
@nuxtjs/robots v5 v6
nuxt-schema-org v5 v6
nuxt-link-checker v4 v5
nuxt-og-image v6 v6 (no major change)

Changelog

   🐞 Bug Fixes

    View changes on GitHub

Don't miss a new nuxt-seo release

NewReleases is sending notifications on new releases.