๋ฉ”์ธ ์ปจํ…์ธ ๋กœ ์ด๋™
๋ฒ„์ „: 3.0.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โ€‹

ํ”„๋ฆฌ์…‹ ์˜ต์…˜์ด๋‚˜ ํ”Œ๋Ÿฌ๊ทธ์ธ ์˜ต์…˜์—์„œ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํŒ

๋Œ€๋ถ€๋ถ„์˜ ๋„ํ์‚ฌ์šฐ๋ฃจ์Šค ์‚ฌ์šฉ์ž๋Š” ํ”„๋ฆฌ์…‹ ์˜ต์…˜์„ ์‚ฌ์šฉํ•ด ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

ํ”„๋ฆฌ์…‹์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ํ”„๋ฆฌ์…‹ ์˜ต์…˜๋ฅผ ํ†ตํ•ด ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค.

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.