More Premium Hugo Themes Premium Nuxt Themes

Sitemap

Powerfully flexible XML Sitemaps that integrate seamlessly, for Nuxt.

Sitemap

Powerfully flexible XML Sitemaps that integrate seamlessly, for Nuxt.

Author Avatar Theme by nuxt-modules
Github Stars Github Stars: 375
Last Commit Last Commit: May 20, 2025 -
First Commit Created: Jan 11, 2024 -
default image

Overview:

The Nuxt.js Sitemap module is a powerful tool that allows users to generate sitemaps for their Nuxt websites. This module provides a wide range of features, including support for single or multiple sitemap files, automatic image discovery, lastmod updates, and caching with SWR. It integrates seamlessly with Nuxt I18n and Nuxt Content, making it a comprehensive solution for managing sitemaps in Nuxt projects.

Features:

  • Single /sitemap.xml or multiple /posts-sitemap.xml, /pages-sitemap.xml: Users can choose to generate a single sitemap file or multiple sitemap files for different sections of their website.
  • Fetch your sitemap URLs from anywhere: The module allows users to fetch sitemap URLs from various sources, providing flexibility in managing the sitemap data.
  • Automatic lastmod, image discovery, and best practice sitemaps: The module automatically updates the “last modified” timestamp, discovers images associated with each URL, and generates sitemaps according to best practices.
  • SWR caching, route rules support: The use of SWR caching improves performance by caching sitemap data, and users can define route rules to customize the sitemap generation process.
  • Debug using the Nuxt DevTools integration or the XML Stylesheet: The Nuxt DevTools integration and XML Stylesheet provide debugging capabilities to help users troubleshoot any issues with their sitemaps.
  • Integrates seamlessly with Nuxt I18n and Nuxt Content: The module seamlessly integrates with Nuxt I18n and Nuxt Content, making it easy to incorporate sitemap generation into multilingual and content-driven Nuxt projects.

Installation:

To use the Nuxt.js Sitemap module, follow these steps:

  1. Install the @nuxtjs/sitemap dependency in your project:

    npm install @nuxtjs/sitemap
    
  2. Add @nuxtjs/sitemap to the modules section in your nuxt.config.js file:

    // nuxt.config.js
    {
      modules: [
        '@nuxtjs/sitemap',
      ],
      sitemap: {
        // Configuration options
      },
    }
    

For more detailed information and configuration options, refer to the full documentation.

Summary:

The Nuxt.js Sitemap module is an essential tool for managing sitemaps in Nuxt projects. With features such as single or multiple sitemap files, automatic updates, image discovery, and seamless integration with Nuxt I18n and Nuxt Content, it provides a comprehensive solution for generating and maintaining sitemaps. By following the installation guide and configuring the module, users can optimize their website’s SEO and ensure search engines can efficiently crawl and index their content.