Skip to content

Releases: nuxt-modules/sitemap

v4.1.8

07 Dec 03:25
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.1.7...v4.1.8

v4.1.7

01 Dec 03:49
Compare
Choose a tag to compare

Bug Fixes

  • avoid re-normalising loc's (89ade0c)

v4.1.6

22 Nov 03:11
Compare
Choose a tag to compare

Bug Fixes

  • i18n: resolve inline [@nuxtjs](https://github.com/nuxtjs)/i18n options (08141d7)

v4.1.5

22 Nov 02:30
Compare
Choose a tag to compare

Bug Fixes

  • devtools: link absolute fetch URLs correctly (4baa84c)
  • set default fetch timeout to 5 seconds (28162c0)

v4.1.4

22 Nov 02:10
Compare
Choose a tag to compare

Bug Fixes

  • avoid runtime types depending on module entry (f1a043e)

v4.1.3

16 Nov 00:24
Compare
Choose a tag to compare

Bug Fixes

  • i18n: safer alternatives setting (b1527e7)
  • i18n: safer filtering of URLs (a20a02c), closes #170

v4.1.2

15 Nov 04:11
Compare
Choose a tag to compare

Bug Fixes

  • i18n: ensure urls have leading slash for regex matching (576c10e)

v4.1.1

15 Nov 03:46
Compare
Choose a tag to compare

Bug Fixes

  • content: improved nuxt/content integration (3a6be3d)
  • i18n: enable filters exclude, include to work (373e471), closes #164
  • i18n: filter pages URLs into their sitemaps (87c7342)
  • i18n: filter user sources into appropriate sitemap when prefixed (e725761)
  • asSitemapUrl composable to resolve types (1f147a3)
  • prerender: filter out sitemap entries in nitro prerender config (56f35f7)

v4.1.0

13 Nov 05:39
Compare
Choose a tag to compare

Notable Changes

AutoLastmod Disabled By Default

Previous to this version, autoLastmod was enabled by default. Recently it was announced that Google will only respect lastmod when you are accurately setting it, otherwise, it will start ignoring it.

For this reason autoLastmod is now disabled by default. However, you can still opt-in to this feature if you'd like to.

With this, when prerendering your pages, the module will now extract the article:modified_time to safely set the lastmod for you.

To learn more, see the new Sitemap.xml Best Practices and Nuxt Prendering docs.

Changelog

Bug Fixes

  • apply route rules (f733261)
  • avoid inserting dynamicUrlsApiEndpoint route (3fcac13)
  • disable autoLastmod by default for best practices (51e739e)
  • exclude /_nuxt/** and /api/** paths by default (c7f4ce0)
  • filter i18n URLs based on non-prefixed path (94a5214)
  • only filter _sitemap with multi sitemaps (e662cad), closes #165
  • sitemap title not rendering correctly in XSL (8fb2388)
  • devtools: tidy up hints (083789d)
  • i18n support i18n strategy prefix_and_default (8bb8adc)
  • i18n match non-prefixed route for i18n route rules (da59a9a)

Features

  • support experimentalWarmUp (da07f0d)
  • prerenderer: extract lastmod from article:modified_time (3ec3667)

v4.0.0

11 Nov 15:56
Compare
Choose a tag to compare

Background

Over the last couple of months I've had many issues reported with similar themes:

  • Dynamic URLs are hard to work with
  • It's difficult to get multiple sitemaps to show the correct URLs
  • I18n has many small issues

I hope this release can resolve these. It has required replacing much of the underlying logic, please test your sitemaps after upgrading.

Features

🥫 Sitemap Sources

The v4 introduces the official concept of 'sources' to your sitemaps.

Every URL within your sitemap will belong to a source. A source will either be a User source or a Application source.

This concept existed before v4 in different forms, v4 aims to clean them up and make working with them much easier.

For full documentation see Sitemap Sources.

🤝 Nuxt Dev Tools Integration

Nuxt Simple Sitemap now has a dedicated tab in Nuxt Dev Tools to help you debug.

nuxt-simple-sitemap-devtools.webm

💬 More i18n Improvements

  • Locale domain support (#155)
  • Support pages opt-outed using defineI18nRoute(false) (#126)
  • Only add trusted i18n routes, will use meta tags when prerendering
  • Less aggressive filtering
  • Opt-in to transform dynamic URLs __i18nTransform: true

See the updated i18n documentation

🚀 Caching Improvements

Now utilises native route rules. By default will set up SWR rules for 10 minutes.

Learn more on the Sitemap Caching guide.

Other Improvements

Nitro Composables for better types

When creating an API endpoint that returns URLs you should use the new defineSitemapEventHandler function for full TypeScript support.

// api/sitemap.ts
export default defineSitemapEventHandler(() => {
  return ['/foo']
})

Prerendering Improvements

Previously prerendering was done in a Node context, this will now run in a Nitro context which will provide better consistency between prerender and runtime environments.

Video Support

Video entries are now supported properly. (#159)

⚠️ Deprecations

  • cacheTtl is deprecated, you should use cacheMaxAgeSeconds which is more explicit.
  • inferStaticPagesAsRoutes is deprecated, if you were using this to opt-out of pages, you should use excludeAppSources: true

☠️ Breaking Changes

Nuxt Hooks no longer supported

If you were using Nuxt hooks to modify the prerendered sitemap, you will need to migrate these to Nitro hooks.

export default defineNuxtConfig({
  hooks: {
    // old - no longer supported
    'sitemap:resolved': function (ctx) {},
    'sitemap:output': function (ctx) {}
  },
})
export default defineNitroPlugin((nitroApp) => {
  nitroApp.hooks.hook('sitemap:output', async (ctx) => {
    // supported!
  })
})

Multi Sitemap App Sources

By default, app sources will no longer be included in multi sitemap implementations. You will need to use includeAppSources: true to re-enable it. See Extending App Sources for more information.

Removed deprecations

  • The hook sitemap:prerender has been removed. You should use sitemap:resolved instead.
  • The config trailingSlash and siteUrl has been removed. You should use site config, see Setting Site Config.
  • The config autoAlternativeLangPrefixes has been removed. If you'd like to set up automatic alternative language prefixes use __i18nTransform.

💚 Support my work

This release took over 40 hours.
If technical SEO developer experience in Nuxt is important to you, consider supporting my work on Nuxt SEO.