Skip to content

Commit 68abf75

Browse files
i18n(ko-KR): update sitemap.mdx (#12156)
Co-authored-by: Yan <[email protected]>
1 parent 01e0fd5 commit 68abf75

File tree

1 file changed

+67
-38
lines changed
  • src/content/docs/ko/guides/integrations-guide

1 file changed

+67
-38
lines changed

src/content/docs/ko/guides/integrations-guide/sitemap.mdx

Lines changed: 67 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ githubIntegrationURL: 'https://github.com/withastro/astro/tree/main/packages/int
88
category: other
99
i18nReady: true
1010
---
11-
1211
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro';
12+
import Since from '~/components/Since.astro';
1313

1414
**[Astro 통합][astro-integration]** Astro 프로젝트를 빌드할 때 페이지를 기반으로 사이트맵을 생성합니다.
1515

@@ -94,7 +94,7 @@ import { defineConfig } from 'astro/config';
9494
import sitemap from '@astrojs/sitemap';
9595

9696
export default defineConfig({
97-
site: 'https://stargazers.club',
97+
site: 'https://example.com',
9898
integrations: [sitemap()],
9999
// ...
100100
});
@@ -113,7 +113,7 @@ export default defineConfig({
113113
<?xml version="1.0" encoding="UTF-8"?>
114114
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
115115
<sitemap>
116-
<loc>https://stargazers.club/sitemap-0.xml</loc>
116+
<loc>https://example.com/sitemap-0.xml</loc>
117117
</sitemap>
118118
</sitemapindex>
119119
```
@@ -122,10 +122,10 @@ export default defineConfig({
122122
<?xml version="1.0" encoding="UTF-8"?>
123123
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
124124
<url>
125-
<loc>https://stargazers.club/</loc>
125+
<loc>https://example.com/</loc>
126126
</url>
127127
<url>
128-
<loc>https://stargazers.club/second-page/</loc>
128+
<loc>https://example.com/second-page/</loc>
129129
</url>
130130
</urlset>
131131
```
@@ -202,10 +202,10 @@ import { defineConfig } from 'astro/config';
202202
import sitemap from '@astrojs/sitemap';
203203

204204
export default defineConfig({
205-
site: 'https://stargazers.club',
205+
site: 'https://example.com',
206206
integrations: [
207207
sitemap({
208-
filter: (page) => page !== 'https://stargazers.club/secret-vip-lounge/',
208+
filter: (page) => page !== 'https://example.com/secret-vip-lounge/',
209209
}),
210210
],
211211
});
@@ -220,32 +220,61 @@ import { defineConfig } from 'astro/config';
220220
import sitemap from '@astrojs/sitemap';
221221

222222
export default defineConfig({
223-
site: 'https://stargazers.club',
223+
site: 'https://example.com',
224224
integrations: [
225225
sitemap({
226226
filter: (page) =>
227-
page !== 'https://stargazers.club/secret-vip-lounge-1/' &&
228-
page !== 'https://stargazers.club/secret-vip-lounge-2/' &&
229-
page !== 'https://stargazers.club/secret-vip-lounge-3/' &&
230-
page !== 'https://stargazers.club/secret-vip-lounge-4/',
227+
page !== 'https://example.com/secret-vip-lounge-1/' &&
228+
page !== 'https://example.com/secret-vip-lounge-2/' &&
229+
page !== 'https://example.com/secret-vip-lounge-3/' &&
230+
page !== 'https://example.com/secret-vip-lounge-4/',
231231
}),
232232
],
233233
});
234234
```
235235

236236
### customPages
237237

238-
어떤 경우에는 페이지가 배포된 사이트의 일부이지만 Astro 프로젝트의 일부가 아닐 수도 있습니다. Astro에서 생성하지 *않은* 페이지를 사이트맵에 포함하고 싶다면 이 옵션을 사용할 수 있습니다.
238+
외부에서 생성된 페이지의 배열입니다. 이는 생성된 사이트맵 파일에 포함됩니다.
239+
240+
이 옵션을 사용하면 배포된 사이트의 일부이지만 Astro에서 생성하지 않은 페이지를 사이트맵에 포함할 수 있습니다.
239241

240242
```js title="astro.config.mjs" ins={8}
241243
import { defineConfig } from 'astro/config';
242244
import sitemap from '@astrojs/sitemap';
243245

244246
export default defineConfig({
245-
site: 'https://stargazers.club',
247+
site: 'https://example.com',
246248
integrations: [
247249
sitemap({
248-
customPages: ['https://stargazers.club/external-page', 'https://stargazers.club/external-page2'],
250+
customPages: ['https://example.com/external-page1', 'https://example.com/external-page2'],
251+
}),
252+
],
253+
});
254+
```
255+
256+
### customSitemaps
257+
258+
<p>
259+
260+
**타입:** `string[]`<br />
261+
**기본값:** `[]`<br />
262+
<Since v="3.5.0" pkg="@astrojs/sitemap" />
263+
</p>
264+
265+
외부에서 생성된 사이트맵의 배열로, 생성된 사이트맵 항목과 함께 `sitemap-index.xml` 파일에 포함할 수 있습니다.
266+
267+
이 옵션을 사용하면 배포된 사이트의 섹션에 Astro에서 생성하지 않은 자체 사이트맵이 있는 경우 Astro에서 생성한 `sitemap-index.xml` 파일에 외부 사이트맵을 포함할 수 있습니다. 이 옵션은 동일한 도메인에서 여러 서비스를 호스팅할 때 유용합니다.
268+
269+
```js title="astro.config.mjs" ins={8}
270+
import { defineConfig } from 'astro/config';
271+
import sitemap from '@astrojs/sitemap';
272+
273+
export default defineConfig({
274+
site: 'https://example.com',
275+
integrations: [
276+
sitemap({
277+
customSitemaps: ['https://example.com/blog/sitemap.xml', 'https://example.com/shop/sitemap.xml'],
249278
}),
250279
],
251280
});
@@ -260,7 +289,7 @@ import { defineConfig } from 'astro/config';
260289
import sitemap from '@astrojs/sitemap';
261290

262291
export default defineConfig({
263-
site: 'https://stargazers.club',
292+
site: 'https://example.com',
264293
integrations: [
265294
sitemap({
266295
entryLimit: 10000,
@@ -284,7 +313,7 @@ import { defineConfig } from 'astro/config';
284313
import sitemap from '@astrojs/sitemap';
285314

286315
export default defineConfig({
287-
site: 'https://stargazers.club',
316+
site: 'https://example.com',
288317
integrations: [
289318
sitemap({
290319
changefreq: 'weekly',
@@ -320,7 +349,7 @@ import { defineConfig } from 'astro/config';
320349
import sitemap from '@astrojs/sitemap';
321350

322351
export default defineConfig({
323-
site: 'https://stargazers.club',
352+
site: 'https://example.com',
324353
integrations: [
325354
sitemap({
326355
serialize(item) {
@@ -357,11 +386,11 @@ import { defineConfig } from 'astro/config';
357386
import sitemap from '@astrojs/sitemap';
358387

359388
export default defineConfig({
360-
site: 'https://stargazers.club',
389+
site: 'https://example.com',
361390
integrations: [
362391
sitemap({
363392
i18n: {
364-
defaultLocale: 'en', // `https://stargazers.club/` 뒤에 `es` 또는 `fr`이 포함되지 않은 모든 URL은 기본 로케일, 즉 `en`으로 처리됩니다.
393+
defaultLocale: 'en', // `https://example.com/` 뒤에 `es` 또는 `fr`이 포함되지 않은 모든 URL은 기본 로케일, 즉 `en`으로 처리됩니다.
365394
locales: {
366395
en: 'en-US', // `defaultLocale` 값은 `locales` 키에 있어야 합니다.
367396
es: 'es-ES',
@@ -378,28 +407,28 @@ export default defineConfig({
378407
```xml title="sitemap-0.xml"
379408
...
380409
<url>
381-
<loc>https://stargazers.club/</loc>
382-
<xhtml:link rel="alternate" hreflang="en-US" href="https://stargazers.club/"/>
383-
<xhtml:link rel="alternate" hreflang="es-ES" href="https://stargazers.club/es/"/>
384-
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://stargazers.club/fr/"/>
410+
<loc>https://example.com/</loc>
411+
<xhtml:link rel="alternate" hreflang="en-US" href="https://example.com/"/>
412+
<xhtml:link rel="alternate" hreflang="es-ES" href="https://example.com/es/"/>
413+
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://example.com/fr/"/>
385414
</url>
386415
<url>
387-
<loc>https://stargazers.club/es/</loc>
388-
<xhtml:link rel="alternate" hreflang="en-US" href="https://stargazers.club/"/>
389-
<xhtml:link rel="alternate" hreflang="es-ES" href="https://stargazers.club/es/"/>
390-
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://stargazers.club/fr/"/>
416+
<loc>https://example.com/es/</loc>
417+
<xhtml:link rel="alternate" hreflang="en-US" href="https://example.com/"/>
418+
<xhtml:link rel="alternate" hreflang="es-ES" href="https://example.com/es/"/>
419+
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://example.com/fr/"/>
391420
</url>
392421
<url>
393-
<loc>https://stargazers.club/fr/</loc>
394-
<xhtml:link rel="alternate" hreflang="en-US" href="https://stargazers.club/"/>
395-
<xhtml:link rel="alternate" hreflang="es-ES" href="https://stargazers.club/es/"/>
396-
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://stargazers.club/fr/"/>
422+
<loc>https://example.com/fr/</loc>
423+
<xhtml:link rel="alternate" hreflang="en-US" href="https://example.com/"/>
424+
<xhtml:link rel="alternate" hreflang="es-ES" href="https://example.com/es/"/>
425+
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://example.com/fr/"/>
397426
</url>
398427
<url>
399-
<loc>https://stargazers.club/es/second-page/</loc>
400-
<xhtml:link rel="alternate" hreflang="es-ES" href="https://stargazers.club/es/second-page/"/>
401-
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://stargazers.club/fr/second-page/"/>
402-
<xhtml:link rel="alternate" hreflang="en-US" href="https://stargazers.club/second-page/"/>
428+
<loc>https://example.com/es/second-page/</loc>
429+
<xhtml:link rel="alternate" hreflang="es-ES" href="https://example.com/es/second-page/"/>
430+
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://example.com/fr/second-page/"/>
431+
<xhtml:link rel="alternate" hreflang="en-US" href="https://example.com/second-page/"/>
403432
</url>
404433
...
405434
```
@@ -435,7 +464,7 @@ import { defineConfig } from 'astro/config';
435464
import sitemap from '@astrojs/sitemap';
436465

437466
export default defineConfig({
438-
site: 'https://stargazers.club',
467+
site: 'https://example.com',
439468
integrations: [
440469
sitemap({
441470
filenameBase: 'astronomy-sitemap'
@@ -444,7 +473,7 @@ export default defineConfig({
444473
});
445474
```
446475

447-
위 구성은 `https://stargazers.club/astronomy-sitemap-0.xml``https://stargazers.club/astronomy-sitemap-index.xml`에 사이트맵 파일을 생성합니다.
476+
위 구성은 `https://example.com/astronomy-sitemap-0.xml``https://example.com/astronomy-sitemap-index.xml`에 사이트맵 파일을 생성합니다.
448477

449478
## 예시
450479

0 commit comments

Comments
 (0)