docusaurus/website/docs/api/plugins/plugin-sitemap.md
Sébastien Lorber 8f47babb46
docs(v2): Docs refactoring and reorganization (#3831)
* stable refactor of plugins api documentation

* plugins sidebar not collapsed by default as small?

* theme docs reorg

* Refactor migration guide doc

* fix broken link
2020-11-30 14:07:08 +01:00

854 B

id title slug
plugin-sitemap 📦 plugin-sitemap /api/plugins/@docusaurus/plugin-sitemap

This plugin creates sitemap for your site so that search engine crawlers can crawl your site more accurately.

Installation

npm install --save @docusaurus/plugin-sitemap

:::tip

If you have installed @docusaurus/preset-classic, you don't need to install it as a dependency. You can also configure it through the classic preset options instead of doing it like below.

:::

Configuration

module.exports = {
  plugins: [
    [
      '@docusaurus/plugin-sitemap',
      {
        cacheTime: 600 * 1000, // 600 sec - cache purge period
        changefreq: 'weekly',
        priority: 0.5,
        trailingSlash: false,
      },
    ],
  ],
};