New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@docusaurus/plugin-sitemap

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docusaurus/plugin-sitemap

Simple sitemap generation plugin for Docusaurus


Version published
Maintainers
6
Created

What is @docusaurus/plugin-sitemap?

@docusaurus/plugin-sitemap is a plugin for Docusaurus, a popular static site generator. This plugin helps in generating a sitemap for your Docusaurus site, which is essential for SEO as it helps search engines to crawl and index your site more effectively.

What are @docusaurus/plugin-sitemap's main functionalities?

Generate Sitemap

This feature allows you to generate a sitemap for your Docusaurus site. You can configure the change frequency and priority for the URLs in the sitemap.

module.exports = {
  plugins: [
    '@docusaurus/plugin-sitemap',
    {
      id: 'default',
      changefreq: 'weekly',
      priority: 0.5,
    },
  ],
};

Custom Sitemap Path

This feature allows you to specify a custom path for the generated sitemap file. By default, the sitemap is saved as 'sitemap.xml', but you can change it to any filename you prefer.

module.exports = {
  plugins: [
    '@docusaurus/plugin-sitemap',
    {
      id: 'default',
      changefreq: 'weekly',
      priority: 0.5,
      sitemapFilename: 'custom-sitemap.xml',
    },
  ],
};

Exclude Specific URLs

This feature allows you to exclude specific URLs or patterns from the sitemap. This is useful if you have pages that you do not want to be indexed by search engines.

module.exports = {
  plugins: [
    '@docusaurus/plugin-sitemap',
    {
      id: 'default',
      changefreq: 'weekly',
      priority: 0.5,
      exclude: ['/exclude-this-page', '/exclude-this-directory/*'],
    },
  ],
};

Other packages similar to @docusaurus/plugin-sitemap

FAQs

Package last updated on 14 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts