본문으로 건너뛰기
버전: 3.0.0-rc.1

📦 plugin-sitemap

검색 엔진 크롤러가 여러분의 사이트를 정확하게 수집할 수 있도록 사이트맵을 만들어주는 플러그인입니다.

production only

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

Installation

npm install --save @docusaurus/plugin-sitemap

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.

Configuration

설정할 수 있는 필드

옵션명타입기본값설명
changefreqstring'weekly'See sitemap docs
prioritynumber0.5See sitemap docs
ignorePatternsstring[][]glob 패턴 목록입니다. 일치하는 라우트 경로는 사이트맵에서 필터링됩니다. 여기에 base URL을 포함해야 할 수도 있습니다.
filenamestringsitemap.xml출력 디렉토리를 기준으로 생성된 사이트맵 파일 경로입니다. 두 개의 파일을 출력하는 두 개의 플러그인 인스턴스가 있는 경우 유용합니다.
정보

이 플러그인은 일부 사이트 설정을 유지합니다.

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

Example configuration

프리셋 옵션이나 플러그인 옵션에서 플러그인을 설정할 수 있습니다.

대부분의 도큐사우루스 사용자는 프리셋 옵션을 사용해 플러그인을 설정합니다.

If you use a preset, configure this plugin through the preset options:

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.