Nuxt Sitemap v8.0.0 · Nuxt Sitemap · Nuxt SEO

-
-
-
-

[1.4K](https://github.com/harlan-zw/nuxt-seo)

[Nuxt SEO on GitHub](https://github.com/harlan-zw/nuxt-seo)

Sitemap

-
-
-
-
-
-
-
-
-
-

Search…```k`` /`

v8.0.12

- Playgrounds
- [Discord Support](https://discord.com/invite/275MBUBvgP)

### Changelog

### Releases

-
-
-
-
-
-

Releases

# Nuxt Sitemap v8.0.0

[Copy for LLMs](https://nuxtseo.com/docs/sitemap/releases/v8.md)

## [Introduction](#introduction)

The v8 release focuses on a fully rewritten devtools experience and several quality of life improvements for Nuxt Content v3 and i18n users.

## [⚠️ Breaking Changes](#️-breaking-changes)

### [Site Config v4](#site-config-v4)

Nuxt Site Config is a module used internally by Nuxt Sitemap.

The major update to v4.0.0 shouldn't have any direct effect on your site, however, you may want to double-check the [breaking changes](https://github.com/harlan-zw/nuxt-site-config/releases/tag/v4.0.0).

### [`asSitemapCollection()` Deprecated](#assitemapcollection-deprecated)

The `asSitemapCollection()` composable has been replaced by `defineSitemapSchema()`. The old API still works but will log a deprecation warning.

```
import { defineCollection, defineContentConfig } from '@nuxt/content'
import { z } from 'zod'
- import { asSitemapCollection } from '@nuxtjs/sitemap/content'
+ import { defineSitemapSchema } from '@nuxtjs/sitemap/content'

export const collections = {
-  content: defineCollection(asSitemapCollection({
-    type: 'page',
-    source: '**/*.md',
-    schema: z.object({ title: z.string() })
-  }))
+  content: defineCollection({
+    type: 'page',
+    source: '**/*.md',
+    schema: z.object({
+      title: z.string(),
+      sitemap: defineSitemapSchema()
+    })
+  })
}
```

## [🚀 New Features](#new-features)

### [`defineSitemapSchema()` Composable](#definesitemapschema-composable)

A new composable for Nuxt Content v3 that provides a cleaner API for integrating sitemap configuration into your content collections. Supports `filter`, `onUrl`, and `name` options.

```
import { defineCollection, defineContentConfig } from '@nuxt/content'
import { z } from 'zod'
import { defineSitemapSchema } from '@nuxtjs/sitemap/content'

export const collections = {
  content: defineCollection({
    type: 'page',
    source: '**/*.md',
    schema: z.object({
      title: z.string(),
      sitemap: defineSitemapSchema({
        filter: entry => !entry.path?.startsWith('/draft'),
        onUrl: (url) => {
          // customize URL entries
          return url
        }
      })
    })
  })
}
```

### [`definePageMeta` Sitemap Configuration](#definepagemeta-sitemap-configuration)

You can now configure sitemap options directly in your page components using `definePageMeta`.

```
<script setup>
definePageMeta({
  sitemap: {
    changefreq: 'daily',
    priority: 0.8
  }
})
</script>
```

### [i18n Multi-Sitemap with Custom Sitemaps](#i18n-multi-sitemap-with-custom-sitemaps)

Custom sitemaps with `includeAppSources: true` are now automatically expanded per locale, generating `{locale}-{name}` formatted sitemaps.

### [Debug Production Endpoint](#debug-production-endpoint)

A new `/__sitemap__/debug-production.json` endpoint is available in development mode, allowing you to inspect what the production sitemap output will look like during development.

## [🐛 Bug Fixes](#bug-fixes)

- **Content v3**: Filter `.navigation` paths from sitemap URL generation
- **Content v3**: Guard `afterParse` hook to prevent silent HMR failures
- **i18n**: Include base URL in multi-sitemap redirect
- **i18n**: Fix exclude filters when base URL and i18n prefixes are present
- **i18n**: Respect `autoI18n: false` to generate single sitemap instead of per-locale sitemaps
- **Types**: Use `robots` instead of `index` in route rules type definition
- **Chunked sitemaps**: Fix path resolution with `sitemapsPathPrefix: '/'`

## [⚡ Performance](#performance)

- Replaced `chalk` with `consola/utils` for a smaller bundle
- Use `URL.canParse()` instead of try/catch `new URL()` for URL validation
- Use `addPrerenderRoutes()` API instead of manual route pushing

[Edit this page](https://github.com/nuxt-modules/sitemap/edit/main/docs/content/5.releases/3.v8.md)

[Markdown For LLMs](https://nuxtseo.com/docs/sitemap/releases/v8.md)

Did this page help you?

On this page

- [Introduction](#introduction)
- [⚠️ Breaking Changes](#️-breaking-changes)
- [🚀 New Features](#new-features)
- [🐛 Bug Fixes](#bug-fixes)
- [⚡ Performance](#performance)

[GitHub](https://github.com/harlan-zw/nuxt-seo) [ Discord](https://discord.com/invite/275MBUBvgP)

###

-
-

Modules

-
-
-
-
-
-
-
-
-

###

-
-
-

###

Nuxt

-
-
-
-
-

Vue

-
-
-
-
-
-
-
-

###

-
-
-
-
-
-
-
-
-
-

Copyright © 2023-2026 Harlan Wilton - [MIT License](https://github.com/harlan-zw/nuxt-seo/blob/main/license) · [mdream](https://mdream.dev)