Ir para o conteĆŗdo principal
Version: 2.1.0

šŸ“¦ plugin-sitemap

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

production only

This plugin is always inactive in development and only active in production because it works on the build output.

InstalaĆ§Ć£oā€‹

npm install --save @docusaurus/theme-bootstrap
tip

If you use the preset @docusaurus/preset-classic, you don't need to install this plugin as a dependency.

You can configure this plugin through the preset options.

ConfiguraĆ§Ć£oā€‹

Campos aceitos:

NomeTypePadrĆ£oDescriĆ§Ć£o
changefreqstring'weekly'See sitemap docs
prioritynumber0.5See sitemap docs
ignorePatternsstring[][]A list of glob patterns; matching route paths will be filtered from the sitemap. Note that you may need to include the base URL in here.
filenamestringsitemap.xmlThe path to the created sitemap file, relative to the output directory. Useful if you have two plugin instances outputting two files.
info

This plugin also respects some site config:

  • noIndex: results in no sitemap generated
  • trailingSlash: determines if the URLs in the sitemap have trailing slashes

ConfiguraĆ§Ć£o de exemploā€‹

VocĆŖ pode configurar este plugin atravĆ©s das opƧƵes de predefiniĆ§Ć£o ou opƧƵes do plugin.

tip

A maioria dos usuĆ”rios do Docusaurus configura este plugin atravĆ©s das configuraƧƵes de predefiniĆ§Ć£o.

If you use a preset, configure this plugin through the opƧƵes de predefiniĆ§Ć£o:

docusaurus.config.js
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
sitemap: {
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/tags/**'],
filename: 'sitemap.xml',
},
},
],
],
};

You can find your sitemap at /sitemap.xml.