diff options
author | jspark | 2023-09-15 07:41:18 +0900 |
---|---|---|
committer | GitHub | 2023-09-15 00:41:18 +0200 |
commit | 01b9ab56343a774645e97226f7de12f7fc41cedb (patch) | |
tree | 568a0452637756fa7fedc2822e6bf9625562e4f5 | |
parent | 29c9b354bbff83168b2a922a2fdbc94e84e384fd (diff) | |
download | IT.starlight-01b9ab56343a774645e97226f7de12f7fc41cedb.tar.gz IT.starlight-01b9ab56343a774645e97226f7de12f7fc41cedb.tar.bz2 IT.starlight-01b9ab56343a774645e97226f7de12f7fc41cedb.zip |
i18n(ko-KR): translate `sidebar.mdx` (#663)
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
-rw-r--r-- | docs/src/content/docs/ko/guides/sidebar.mdx | 473 |
1 files changed, 473 insertions, 0 deletions
diff --git a/docs/src/content/docs/ko/guides/sidebar.mdx b/docs/src/content/docs/ko/guides/sidebar.mdx new file mode 100644 index 00000000..da8d5da3 --- /dev/null +++ b/docs/src/content/docs/ko/guides/sidebar.mdx @@ -0,0 +1,473 @@ +--- +title: ์ฌ์ด๋๋ฐ ํ์ +description: Starlight ์ฌ์ดํธ์ ์ฌ์ด๋๋ฐ ํ์ ๋งํฌ๋ฅผ ์ค์ ํ๊ณ ์ฌ์ฉ์ ์ ์ํ๋ ๋ฐฉ๋ฒ์ ์์๋ณด์ธ์. +sidebar: + badge: New +--- + +import FileTree from '../../../../components/file-tree.astro'; +import SidebarPreview from '../../../../components/sidebar-preview.astro'; + +์ ๊ตฌ์ฑ๋ ์ฌ์ด๋๋ฐ๋ ์ฌ์ฉ์๊ฐ ์ฌ์ดํธ๋ฅผ ํ์ํ๋ ์ฃผ์ ๋ฐฉ๋ฒ ์ค ํ๋์ด๋ฏ๋ก ์ข์ ๋ฌธ์์ ํต์ฌ์
๋๋ค. Starlight๋ ์ฌ์ด๋๋ฐ ๋ ์ด์์๊ณผ ์ฝํ
์ธ ๋ฅผ ๋ณ๊ฒฝํ ์ ์๋ ์์ ํ ์ต์
์ธํธ๋ฅผ ์ ๊ณตํฉ๋๋ค. + +## ๊ธฐ๋ณธ ์ฌ์ด๋๋ฐ + +๊ธฐ๋ณธ์ ์ผ๋ก Starlight๋ ๊ฐ ํ์ผ์ `title` ์์ฑ์ ์ฌ์ด๋๋ฐ ํญ๋ชฉ์ผ๋ก ์ฌ์ฉํ์ฌ ์๋์ผ๋ก ๋ฌธ์์ ํ์ผ ์์คํ
๊ตฌ์กฐ ๊ธฐ๋ฐ์ ์ฌ์ด๋๋ฐ๋ฅผ ์์ฑํฉ๋๋ค. + +์๋ฅผ ๋ค์ด, ๋ค์๊ณผ ๊ฐ์ ํ์ผ ๊ตฌ์กฐ๊ฐ ์๋ค๊ณ ๊ฐ์ ํฉ๋๋ค. + +<FileTree> + +- src/ + - content/ + - docs/ + - guides/ + - components.md + - i18n.md + - reference/ + - configuration.md + +</FileTree> + +๋ค์ ์ฌ์ด๋๋ฐ๊ฐ ์๋์ผ๋ก ์์ฑ๋ฉ๋๋ค. + +<SidebarPreview + config={[ + { + label: 'guides', + items: [ + { label: 'Components', link: '/guides/components/' }, + { label: 'Internationalization (i18n)', link: '/guides/i18n/' }, + ], + }, + { + label: 'reference', + items: [ + { label: 'Configuration Reference', link: '/reference/configuration/' }, + ], + }, + ]} +/> + +[์๋ ์์ฑ ๊ทธ๋ฃน](#์๋-์์ฑ-๊ทธ๋ฃน) ์น์
์์ ์๋์ผ๋ก ์์ฑ๋ ์ฌ์ด๋๋ฐ์ ๋ํด ์์ธํ ์์๋ณด์ธ์. + +## ๋งํฌ ๋ฐ ๋งํฌ ๊ทธ๋ฃน ์ถ๊ฐ + +`astro.config.mjs` ํ์ผ์ [`starlight.sidebar`](/ko/reference/configuration/#sidebar) ์์ฑ์ ์ฌ์ฉํ์ฌ ์ฌ์ด๋๋ฐ [๋งํฌ](#๋งํฌ) ๋ฐ [๋งํฌ ๊ทธ๋ฃน](#๊ทธ๋ฃน) (์ ์ด์ ํค๋ ๋ฐ ํ์ ํญ๋ชฉ๋ค)์ ๊ตฌ์ฑํ ์ ์์ต๋๋ค. + +๋งํฌ์ ๊ทธ๋ฃน์ ๊ฒฐํฉํ์ฌ ๋ค์ํ ์ฌ์ด๋๋ฐ ๋ ์ด์์์ ๋ง๋ค ์ ์์ต๋๋ค. + +### ๋งํฌ + +`label` ๋ฐ `link` ์์ฑ์ด ์๋ ๊ฐ์ฒด๋ฅผ ์ฌ์ฉํ์ฌ ๋ด๋ถ ๋๋ ์ธ๋ถ ํ์ด์ง์ ๋ํ ๋งํฌ๋ฅผ ์ถ๊ฐํ ์ ์์ต๋๋ค. + +```js +starlight({ + sidebar: [ + // CSS ๋ฐ ์คํ์ผ๋ง ๊ฐ์ด๋ ๋งํฌ + { label: 'CSS & ์คํ์ผ๋ง', link: '/ko/guides/css-and-tailwind/' }, + // Astro ์น์ฌ์ดํธ๋ก ์ฐ๊ฒฐ๋๋ ์ธ๋ถ ๋งํฌ + { label: 'Astro', link: 'https://astro.build/' }, + ], +}); +``` + +์ ๊ตฌ์ฑ์ ๋ค์ ์ฌ์ด๋๋ฐ๋ฅผ ์์ฑํฉ๋๋ค. + +<SidebarPreview + config={[ + { label: 'CSS & ์คํ์ผ๋ง', link: '/ko/guides/css-and-tailwind/' }, + { label: 'Astro', link: 'https://astro.build/' }, + ]} +/> + +### ๊ทธ๋ฃน + +์ ์ ์ ์๋ ์ ๋ชฉ ์๋ ๊ด๋ จ ๋งํฌ๋ฅผ ๊ทธ๋ฃนํํ์ฌ ์ฌ์ด๋๋ฐ์ ๊ตฌ์กฐ๋ฅผ ์ถ๊ฐํ ์ ์์ต๋๋ค. ๊ทธ๋ฃน์๋ ๋งํฌ์ ๊ธฐํ ํ์ ๊ทธ๋ฃน์ด ๋ชจ๋ ํฌํจ๋ ์ ์์ต๋๋ค. + +`label` ๋ฐ `items` ์์ฑ์ด ์๋ ๊ฐ์ฒด๋ฅผ ์ฌ์ฉํ์ฌ ๊ทธ๋ฃน์ ์ถ๊ฐํฉ๋๋ค. `label`์ ๊ทธ๋ฃน์ ์ ๋ชฉ์ผ๋ก ์ฌ์ฉ๋ฉ๋๋ค. `items` ๋ฐฐ์ด์ ๋งํฌ๋ ํ์ ๊ทธ๋ฃน์ ์ถ๊ฐํ ์ ์์ต๋๋ค. + +```js +starlight({ + sidebar: [ + // "๊ฐ์ด๋" ๋ผ๋ฒจ์ด ๋ถ์ ๋งํฌ ๊ทธ๋ฃน + { + label: '๊ฐ์ด๋', + items: [ + { label: '์ปดํฌ๋ํธ', link: '/ko/guides/components/' }, + { label: '๊ตญ์ ํ (i18n)', link: '/ko/guides/i18n/' }, + // ์ค์ฒฉ๋ ๋งํฌ ๊ทธ๋ฃน + { + label: '์คํ์ผ๋ง', + items: [ + { label: 'CSS', link: '/ko/guides/css-and-tailwind/' }, + { label: 'Tailwind', link: '/ko/guides/css-and-tailwind/' }, + { label: 'Shiki', link: '/ko/guides/css-and-tailwind/' }, + ], + }, + ], + }, + ], +}); +``` + +์ ๊ตฌ์ฑ์ ๋ค์ ์ฌ์ด๋๋ฐ๋ฅผ ์์ฑํฉ๋๋ค. + +<SidebarPreview + config={[ + { + label: '๊ฐ์ด๋', + items: [ + { label: '์ปดํฌ๋ํธ', link: '/ko/guides/components/' }, + { label: '๊ตญ์ ํ (i18n)', link: '/ko/guides/i18n/' }, + // ์ค์ฒฉ๋ ๋งํฌ ๊ทธ๋ฃน + { + label: '์คํ์ผ๋ง', + items: [ + { label: 'CSS', link: '/ko/guides/css-and-tailwind/' }, + { label: 'Tailwind', link: '/ko/guides/css-and-tailwind/' }, + { label: 'Shiki', link: '/ko/guides/css-and-tailwind/' }, + ], + }, + ], + }, + ]} +/> + +### ์๋ ์์ฑ ๊ทธ๋ฃน + +Starlight๋ ๋ฌธ์ ๋๋ ํ ๋ฆฌ๋ฅผ ๊ธฐ๋ฐํด์ ์๋์ผ๋ก ์ฌ์ด๋๋ฐ์ ๊ทธ๋ฃน์ ์์ฑํ ์ ์์ต๋๋ค. ์ด๋ ๊ทธ๋ฃน์ ๊ฐ ์ฌ์ด๋๋ฐ ํญ๋ชฉ์ ์๋์ผ๋ก ์
๋ ฅํ๊ณ ์ถ์ง ์์ ๋ ์ ์ฉํฉ๋๋ค. ๊ธฐ๋ณธ์ ์ผ๋ก ํ์ด์ง๋ ํ์ผ ์ด๋ฆ์ ์ํ๋ฒณ์์ผ๋ก ์ ๋ ฌํ์ฌ ์ฌ์ด๋๋ฐ์ ํ์ํฉ๋๋ค. + +`label` ๋ฐ `autogenerate` ์์ฑ์ด ์๋ ๊ฐ์ฒด๋ฅผ ์ฌ์ฉํ์ฌ ์๋ ์์ฑ ๊ทธ๋ฃน์ ์ถ๊ฐํฉ๋๋ค. `autogenerate` ๊ตฌ์ฑ์ ์ฌ์ด๋๋ฐ ํญ๋ชฉ์ ์ฌ์ฉํ ๋๋ ํ ๋ฆฌ๋ฅผ ์ง์ ํด์ผ ํฉ๋๋ค. ์๋ฅผ ๋ค์ด, ๋ค์ ๊ตฌ์ฑ์ ์ฌ์ฉํ ์ ์์ต๋๋ค. + +```js +starlight({ + sidebar: [ + { + label: '๊ฐ์ด๋', + // 'guides' ๋๋ ํ ๋ฆฌ์ ๋ํ ๋งํฌ ๊ทธ๋ฃน์ ์๋์ผ๋ก ์์ฑ + autogenerate: { directory: 'guides' }, + }, + ], +}); +``` + +ํ์ผ ๊ตฌ์กฐ๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. + +<FileTree> + +- src/ + - content/ + - docs/ + - guides/ + - components.md + - i18n.md + - advanced/ + - project-structure.md + +</FileTree> + +๋ค์ ์ฌ์ด๋๋ฐ๊ฐ ์์ฑ๋ฉ๋๋ค: + +<SidebarPreview + config={[ + { + label: '๊ฐ์ด๋', + items: [ + { label: '์ปดํฌ๋ํธ', link: '/ko/guides/components/' }, + { label: '๊ตญ์ ํ (i18n)', link: '/ko/guides/i18n/' }, + { + label: '๊ณ ๊ธ', + items: [ + { + label: 'ํ๋ก์ ํธ ๊ตฌ์กฐ', + link: '/ko/guides/project-structure/', + }, + ], + }, + ], + }, + ]} +/> + +#### Frontmatter์์ ์๋์ผ๋ก ์์ฑ๋ ๋งํฌ ๋ณ๊ฒฝํ๊ธฐ + +์๋์ผ๋ก ์์ฑ๋ ๋งํฌ๋ฅผ ๋ณ๊ฒฝํ๋ ค๋ฉด ๊ฐ๋ณ ํ์ด์ง์ [`sidebar` frontmatter ํ๋](/ko/reference/frontmatter/#sidebar)๋ฅผ ์ฌ์ฉํ์ธ์. + +frontmatter์์ sidebar ์ต์
์ ์ฌ์ฉํ๋ฉด [์ฌ์ฉ์ ์ ์ ๋ผ๋ฒจ](/ko/reference/frontmatter/#label)์ ์ค์ ํ๊ฑฐ๋ ๋งํฌ์ [๋ฐฐ์ง](/ko/reference/frontmatter/#badge)๋ฅผ ์ถ๊ฐํ๊ฑฐ๋ ์ฌ์ด๋๋ฐ์์ ๋งํฌ๋ฅผ [์จ๊ธฐ๊ฑฐ๋](/ko/reference/frontmatter/#hidden) [์ฌ์ฉ์ ์ ์ ์ ๋ ฌ ๊ธฐ์ค](/ko/reference/frontmatter/#order)์ ์ค์ ํ ์ ์์ต๋๋ค. + +```md +--- +title: ๋์ ํ์ด์ง +sidebar: + # ๋งํฌ์ ๋ํ ์ฌ์ฉ์ ์ ์ ๋ผ๋ฒจ ์ค์ + label: ์ฌ์ฉ์ ์ ์ ์ฌ์ด๋๋ฐ ๋ผ๋ฒจ + # ๋งํฌ์ ๋ํ ์ฌ์ฉ์ ์ ์ ์์ ์ค์ (์ซ์๊ฐ ๋ฎ์์๋ก ๋ ์์ ํ์๋ฉ๋๋ค.) + order: 2 + # ๋งํฌ์ ๋ฐฐ์ง ์ถ๊ฐ + badge: + text: New + variant: tip +--- +``` + +์ frontmatter๊ฐ ์๋ ํ์ด์ง๋ฅผ ํฌํจํ๋ ์๋ ์์ฑ ๊ทธ๋ฃน์ ๋ค์ ์ฌ์ด๋๋ฐ๋ฅผ ์์ฑํฉ๋๋ค. + +<SidebarPreview + config={[ + { + label: '๊ฐ์ด๋', + items: [ + { label: 'ํํ์ด์ง', link: '#' }, + { + label: '์ฌ์ฉ์ ์ ์ ์ฌ์ด๋๋ฐ ๋ผ๋ฒจ', + link: '#', + badge: { text: 'New', variant: 'tip' }, + }, + { label: '๋ค๋ฅธ ํ์ด์ง', link: '#' }, + ], + }, + ]} +/> + +:::note + +`sidebar` frontmatter ๊ตฌ์ฑ์ ์๋์ผ๋ก ์์ฑ๋ ๋งํฌ์๋ง ์ฌ์ฉ๋๋ฉฐ ์๋์ผ๋ก ์ ์๋ ๋งํฌ์์๋ ๋ฌด์๋ฉ๋๋ค. + +::: + +## ๋ฐฐ์ง + +๋งํฌ ๋ผ๋ฒจ ์์ ๋ฐฐ์ง๋ฅผ ํ์ํ๊ธฐ ์ํด ๋งํฌ์๋ `badge` ์์ฑ์ด ํฌํจ๋ ์๋ ์์ต๋๋ค. + +```js +starlight({ + sidebar: [ + { + label: '๊ฐ์ด๋', + items: [ + // "New" ๋ฐฐ์ง๊ฐ ํฌํจ๋ ๋งํฌ + { + label: '์ปดํฌ๋ํธ', + link: '/ko/guides/components/', + badge: 'New', + }, + ], + }, + ], +}); +``` + +์ ๊ตฌ์ฑ์ ๋ค์ ์ฌ์ด๋๋ฐ๋ฅผ ์์ฑํฉ๋๋ค. + +<SidebarPreview + config={[ + { + label: '๊ฐ์ด๋', + items: [ + { + label: '์ปดํฌ๋ํธ', + link: '/ko/guides/components/', + badge: { text: 'New', variant: 'default' }, + }, + ], + }, + ]} +/> + +### ๋ฐฐ์ง ๋ณํ + +`text` ๋ฐ `variant` ์์ฑ์ด ์๋ ๊ฐ์ฒด๋ฅผ ์ฌ์ฉํ์ฌ ๋ฐฐ์ง ์คํ์ผ์ ๋ณ๊ฒฝํ ์ ์์ต๋๋ค. + +`text`๋ ํ์ํ ์ฝํ
์ธ ๋ฅผ ๋ํ๋
๋๋ค(์: "New"). `variant` ์์ฑ์ ๊ฐ์ `note`, `tip`, `danger`, `caution`, `success` ์ค ํ๋๋ก ์ค์ ํ์ฌ ์ฌ์ดํธ์ ๊ฐ์กฐ ์์์ ์ฌ์ฉํ๋ `default` ์คํ์ผ์ ๋ณ๊ฒฝํ์ธ์. + +```js +starlight({ + sidebar: [ + { + label: '๊ฐ์ด๋', + items: [ + // ๋
ธ๋์ "์คํ์ ๊ธฐ๋ฅ" ๋ฐฐ์ง๊ฐ ํฌํจ๋ ๋งํฌ + { + label: '์ปดํฌ๋ํธ', + link: '/ko/guides/components/', + badge: { text: '์คํ์ ๊ธฐ๋ฅ', variant: 'caution' }, + }, + ], + }, + ], +}); +``` + +์ ๊ตฌ์ฑ์ ๋ค์ ์ฌ์ด๋๋ฐ๋ฅผ ์์ฑํฉ๋๋ค. + +<SidebarPreview + config={[ + { + label: '๊ฐ์ด๋', + items: [ + { + label: '์ปดํฌ๋ํธ', + link: '/ko/guides/components/', + badge: { text: '์คํ์ ๊ธฐ๋ฅ', variant: 'caution' }, + }, + ], + }, + ]} +/> + +## ๊ตญ์ ํ + +๋งํฌ ๋๋ ๊ทธ๋ฃน์ ๋ผ๋ฒจ์ ์ง์๋๋ ๊ฐ ์ธ์ด๋ก ๋ฒ์ญํ๊ธฐ ์ํด ๋งํฌ ๋ฐ ๊ทธ๋ฃน ํญ๋ชฉ์ `translations` ์์ฑ์ ์ฌ์ฉํ ์ ์์ต๋๋ค. +`label` ์์ฑ์ ๊ธฐ๋ณธ ์ธ์ด ๋ฐ ๋ฒ์ญ์ด ์ ๊ณต๋์ง ์๋ ์ธ์ด๋ฅผ ์ํด ์ฌ์ฉ๋ ๊ฒ์
๋๋ค. + +```js +starlight({ + sidebar: [ + { + label: '๊ฐ์ด๋', + translations: { + es: 'Guรญas', + }, + items: [ + { + label: '์ปดํฌ๋ํธ', + translations: { + es: 'Componentes', + }, + link: '/ko/guides/components/', + }, + { + label: '๊ตญ์ ํ (i18n)', + translations: { + es: 'Internacionalizaciรณn (i18n)', + }, + link: '/ko/guides/i18n/', + }, + ], + }, + ], +}); +``` + +์คํ์ธ์ด๋ก ๋ฌธ์๋ฅผ ๊ฒ์ํ๋ฉด ๋ค์ ์ฌ์ด๋๋ฐ๊ฐ ์์ฑ๋ฉ๋๋ค. + +<SidebarPreview + config={[ + { + label: 'Guรญas', + items: [ + { label: 'Componentes', link: '/ko/guides/components/' }, + { label: 'Internacionalizaciรณn (i18n)', link: '/ko/guides/i18n/' }, + ], + }, + ]} +/> + +## ๊ทธ๋ฃน ์ถ์ + +`collapsed` ์์ฑ์ `true`๋ก ์ค์ ํ๋ฉด ๋งํฌ ๊ทธ๋ฃน์ ๊ธฐ๋ณธ ์ํ๋ฅผ ์ ํ ์ํ๋ก ๋ง๋ค ์ ์์ต๋๋ค. + +```js +starlight({ + sidebar: [ + { + label: '๊ฐ์ด๋', + // ์ ํ ์ํ๋ฅผ ๊ธฐ๋ณธ ์ํ๋ก ์ค์ + collapsed: true, + items: [ + { label: '์ปดํฌ๋ํธ', link: '/ko/guides/components/' }, + { label: '๊ตญ์ ํ (i18n)', link: '/ko/guides/i18n/' }, + ], + }, + ], +}); +``` + +์ ๊ตฌ์ฑ์ ๋ค์ ์ฌ์ด๋๋ฐ๋ฅผ ์์ฑํฉ๋๋ค. + +<SidebarPreview + config={[ + { + label: '๊ฐ์ด๋', + collapsed: true, + items: [ + { label: '์ปดํฌ๋ํธ', link: '/ko/guides/components/' }, + { label: '๊ตญ์ ํ (i18n)', link: '/ko/guides/i18n/' }, + ], + }, + ]} +/> + +[์๋ ์์ฑ ๊ทธ๋ฃน](#์๋-์์ฑ-๊ทธ๋ฃน)์ ์์ ๊ทธ๋ฃน์ `collapsed` ๊ฐ์ ๋ฐ๋ฆ
๋๋ค. + +```js +starlight({ + sidebar: [ + { + label: '๊ฐ์ด๋', + // ๊ทธ๋ฃน ๋ฐ ์๋์ผ๋ก ์์ฑ๋ ํ์ ๊ทธ๋ฃน์ ๊ธฐ๋ณธ ์ํ๊ฐ ์ ํ ์ํ๊ฐ ๋ฉ๋๋ค. + collapsed: true, + autogenerate: { directory: 'guides' }, + }, + ], +}); +``` + +์ ๊ตฌ์ฑ์ ๋ค์ ์ฌ์ด๋๋ฐ๋ฅผ ์์ฑํฉ๋๋ค. + +<SidebarPreview + config={[ + { + label: '๊ฐ์ด๋', + collapsed: true, + items: [ + { label: '์ปดํฌ๋ํธ', link: '/ko/guides/components/' }, + { label: '๊ตญ์ ํ (i18n)', link: '/ko/guides/i18n/' }, + { + label: '๊ณ ๊ธ', + collapsed: true, + items: [ + { label: 'ํ๋ก์ ํธ ๊ตฌ์กฐ', link: '/ko/guides/project-structure/' }, + ], + }, + ], + }, + ]} +/> + +`autogenerate.collapsed` ์์ฑ์ ์ ์ํ์ฌ ์ด ๋์์ ๋ณ๊ฒฝํ ์ ์์ต๋๋ค. + +```js +starlight({ + sidebar: [ + { + label: '๊ฐ์ด๋', + // "๊ฐ์ด๋" ๊ทธ๋ฃน์ ์ถ์ํ์ง ์๊ณ , ์๋ ์์ฑ๋ ํ์ ๊ทธ๋ฃน์ ์ถ์ํฉ๋๋ค. + collapsed: false, + autogenerate: { directory: 'guides', collapsed: true }, + }, + ], +}); +``` + +์ ๊ตฌ์ฑ์ ๋ค์ ์ฌ์ด๋๋ฐ๋ฅผ ์์ฑํฉ๋๋ค. + +<SidebarPreview + config={[ + { + label: '๊ฐ์ด๋', + items: [ + { label: '์ปดํฌ๋ํธ', link: '/ko/guides/components/' }, + { label: '๊ตญ์ ํ (i18n)', link: '/ko/guides/i18n/' }, + { + label: '๊ณ ๊ธ', + collapsed: true, + items: [ + { label: 'ํ๋ก์ ํธ ๊ตฌ์กฐ', link: '/ko/guides/project-structure/' }, + ], + }, + ], + }, + ]} +/> |