summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJs Park2023-12-06 18:17:13 +0900
committerGitHub2023-12-06 10:17:13 +0100
commitcac1ea7067acb6ee3ae7ab45a5f9d704bcaae9b5 (patch)
treecb970e576b5f176b817fed6a2a020e59abc8ed1a
parent29eb251de07202824f1578931388327856bce5e6 (diff)
downloadIT.starlight-cac1ea7067acb6ee3ae7ab45a5f9d704bcaae9b5.tar.gz
IT.starlight-cac1ea7067acb6ee3ae7ab45a5f9d704bcaae9b5.tar.bz2
IT.starlight-cac1ea7067acb6ee3ae7ab45a5f9d704bcaae9b5.zip
i18n(ko-KR): add `site-search.mdx` (#1233)
Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com>
-rw-r--r--docs/src/content/docs/ko/guides/site-search.mdx166
1 files changed, 166 insertions, 0 deletions
diff --git a/docs/src/content/docs/ko/guides/site-search.mdx b/docs/src/content/docs/ko/guides/site-search.mdx
new file mode 100644
index 00000000..d3a64f55
--- /dev/null
+++ b/docs/src/content/docs/ko/guides/site-search.mdx
@@ -0,0 +1,166 @@
+---
+title: ์‚ฌ์ดํŠธ ๊ฒ€์ƒ‰
+description: Starlight์— ๋‚ด์žฅ๋œ ์‚ฌ์ดํŠธ ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ๊ณผ ์ด๋ฅผ ์‚ฌ์šฉ์ž ์ •์˜ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์•Œ์•„๋ณด์„ธ์š”.
+sidebar:
+ badge: New
+---
+
+import { Tabs, TabItem } from '@astrojs/starlight/components';
+
+๊ธฐ๋ณธ์ ์œผ๋กœ Starlight ์‚ฌ์ดํŠธ์—๋Š” ์ •์  ์‚ฌ์ดํŠธ๋ฅผ ์œ„ํ•œ ๋น ๋ฅด๊ณ  ๋‚ฎ์€ ๋Œ€์—ญํญ์„ ๊ฐ–์ถ˜ ๊ฒ€์ƒ‰ ๋„๊ตฌ์ธ [Pagefind](https://pagefind.app/)์—์„œ ์ œ๊ณตํ•˜๋Š” ์ „์ฒด ํ…์ŠคํŠธ ๊ฒ€์ƒ‰์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
+
+๊ฒ€์ƒ‰์„ ํ™œ์„ฑํ™”ํ•˜๋Š” ๋ฐ ๊ตฌ์„ฑ์ด ํ•„์š”ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์‚ฌ์ดํŠธ๋ฅผ ๊ตฌ์ถ•ํ•˜๊ณ  ๋ฐฐํฌํ•œ ๋‹ค์Œ, ์‚ฌ์ดํŠธ ํ—ค๋”์˜ ๊ฒ€์ƒ‰์ฐฝ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ฝ˜ํ…์ธ ๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
+
+## ๊ฒ€์ƒ‰๊ฒฐ๊ณผ์—์„œ ์ฝ˜ํ…์ธ  ์ˆจ๊ธฐ๊ธฐ
+
+### ํŽ˜์ด์ง€ ์ œ์™ธ
+
+๊ฒ€์ƒ‰ ์ƒ‰์ธ์—์„œ ํŽ˜์ด์ง€๋ฅผ ์ œ์™ธํ•˜๋ ค๋ฉด ํŽ˜์ด์ง€ ํ”„๋ŸฐํŠธ๋งคํ„ฐ์— [`pagefind: false`](/ko/reference/frontmatter/#pagefind)๋ฅผ ์ถ”๊ฐ€ํ•˜์„ธ์š”.
+
+```md title="src/content/docs/not-indexed.md" ins={3}
+---
+title: ๊ฒ€์ƒ‰์—์„œ ์ˆจ๊ธธ ์ฝ˜ํ…์ธ 
+pagefind: false
+---
+```
+
+### ํŽ˜์ด์ง€ ์ผ๋ถ€ ์ œ์™ธ
+
+Pagefind๋Š” [`data-pagefind-ignore`](https://pagefind.app/docs/indexing/#removing-individual-elements-from-the-index) ์†์„ฑ์ด ์žˆ๋Š” ์š”์†Œ ๋‚ด๋ถ€์˜ ์ฝ˜ํ…์ธ ๋ฅผ ๋ฌด์‹œํ•ฉ๋‹ˆ๋‹ค.
+
+๋‹ค์Œ ์˜ˆ์‹œ์—์„œ ์ฒซ ๋ฒˆ์งธ ๋‹จ๋ฝ์€ ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ์— ํ‘œ์‹œ๋˜์ง€๋งŒ `<div>`์˜ ๋‚ด์šฉ์€ ํ‘œ์‹œ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
+
+```md title="src/content/docs/partially-indexed.md" ins="data-pagefind-ignore"
+---
+title: ๋ถ€๋ถ„์ ์œผ๋กœ ์ƒ‰์ธ์ด ์ƒ์„ฑ๋œ ํŽ˜์ด์ง€
+---
+
+์ด ํ…์ŠคํŠธ๋Š” ๊ฒ€์ƒ‰์„ ํ†ตํ•ด ์ฐพ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
+
+<div data-pagefind-ignore>
+
+์ด ํ…์ŠคํŠธ๋Š” ๊ฒ€์ƒ‰์—์„œ ์ˆจ๊ฒจ์ง‘๋‹ˆ๋‹ค.
+
+</div>
+```
+
+## ๋Œ€์ฒด ๊ฒ€์ƒ‰ ๊ณต๊ธ‰์ž
+
+### Algolia DocSearch
+
+[Algolia์˜ DocSearch ํ”„๋กœ๊ทธ๋žจ](https://docsearch.algolia.com/)์— ๋Œ€ํ•œ ์•ก์„ธ์Šค ๊ถŒํ•œ์ด ์žˆ๊ณ , ์ด๋ฅผ Pagefind ๋Œ€์‹  ์‚ฌ์šฉํ•˜๋ ค๋Š” ๊ฒฝ์šฐ, ๊ณต์‹ Starlight DocSearch ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
+
+1. `@astrojs/starlight-docsearch`๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.
+
+ <Tabs>
+
+ <TabItem label="npm">
+
+ ```sh
+ npm install @astrojs/starlight-docsearch
+ ```
+
+ </TabItem>
+
+ <TabItem label="pnpm">
+
+ ```sh
+ pnpm install @astrojs/starlight-docsearch
+ ```
+
+ </TabItem>
+
+ <TabItem label="Yarn">
+
+ ```sh
+ yarn add @astrojs/starlight-docsearch
+ ```
+
+ </TabItem>
+
+ </Tabs>
+
+2. `astro.config.mjs` ํŒŒ์ผ์˜ Starlight [`plugins`](/ko/reference/configuration/#plugins) ๊ตฌ์„ฑ์— DocSearch๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  Algolia `appId`, `apiKey`, `indexName`๋ฅผ ์ „๋‹ฌํ•ฉ๋‹ˆ๋‹ค.
+
+ ```js ins={4,10-16}
+ // astro.config.mjs
+ import { defineConfig } from 'astro/config';
+ import starlight from '@astrojs/starlight';
+ import starlightDocSearch from '@astrojs/starlight-docsearch';
+
+ export default defineConfig({
+ integrations: [
+ starlight({
+ title: 'DocSearch๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์‚ฌ์ดํŠธ',
+ plugins: [
+ starlightDocSearch({
+ appId: 'YOUR_APP_ID',
+ apiKey: 'YOUR_SEARCH_API_KEY',
+ indexName: 'YOUR_INDEX_NAME',
+ }),
+ ],
+ }),
+ ],
+ });
+ ```
+
+์ด ์—…๋ฐ์ดํŠธ๋œ ๊ตฌ์„ฑ์„ ์‚ฌ์šฉํ•˜๋ฉด ์‚ฌ์ดํŠธ์˜ ๊ฒ€์ƒ‰ ์ฐฝ์—์„œ ๊ธฐ๋ณธ ๊ฒ€์ƒ‰ ๋ชจ๋‹ฌ ๋Œ€์‹  Algolia ๋ชจ๋‹ฌ์ด ์—ด๋ฆฝ๋‹ˆ๋‹ค.
+
+#### DocSearch UI ๋ฒˆ์—ญ
+
+DocSearch๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ์˜์–ด UI ๋ฌธ์ž์—ด๋งŒ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
+Starlight์— ๋‚ด์žฅ๋œ [๊ตญ์ œํ™” ์‹œ์Šคํ…œ](/ko/guides/i18n/#starlight-ui-๋ฒˆ์—ญ)์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ชจ๋‹ฌ UI ๋ฒˆ์—ญ์„ ์ถ”๊ฐ€ํ•˜์„ธ์š”.
+
+1. `src/content/config.ts` ํŒŒ์ผ์˜ DocSearch ์Šคํ‚ค๋งˆ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Starlight์˜ `i18n` ์ฝ˜ํ…์ธ  ์ปฌ๋ ‰์…˜ ์ •์˜๋ฅผ ํ™•์žฅํ•ฉ๋‹ˆ๋‹ค.
+
+ ```js ins={4} ins=/{ extend: .+ }/
+ // src/content/config.ts
+ import { defineCollection } from 'astro:content';
+ import { docsSchema, i18nSchema } from '@astrojs/starlight/schema';
+ import { docSearchI18nSchema } from '@astrojs/starlight-docsearch/schema';
+
+ export const collections = {
+ docs: defineCollection({ schema: docsSchema() }),
+ i18n: defineCollection({
+ type: 'data',
+ schema: i18nSchema({ extend: docSearchI18nSchema() }),
+ }),
+ };
+ ```
+
+2. `src/content/i18n/` ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์žˆ๋Š” JSON ํŒŒ์ผ์— ๋ฒˆ์—ญ์„ ์ถ”๊ฐ€ํ•˜์„ธ์š”.
+
+ DocSearch์—์„œ ์‚ฌ์šฉ๋˜๋Š” ์˜์–ด ๊ธฐ๋ณธ๊ฐ’์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.
+
+ ```json title="src/content/i18n/en.json"
+ {
+ "docsearch.searchBox.resetButtonTitle": "Clear the query",
+ "docsearch.searchBox.resetButtonAriaLabel": "Clear the query",
+ "docsearch.searchBox.cancelButtonText": "Cancel",
+ "docsearch.searchBox.cancelButtonAriaLabel": "Cancel",
+
+ "docsearch.startScreen.recentSearchesTitle": "Recent",
+ "docsearch.startScreen.noRecentSearchesText": "No recent searches",
+ "docsearch.startScreen.saveRecentSearchButtonTitle": "Save this search",
+ "docsearch.startScreen.removeRecentSearchButtonTitle": "Remove this search from history",
+ "docsearch.startScreen.favoriteSearchesTitle": "Favorite",
+ "docsearch.startScreen.removeFavoriteSearchButtonTitle": "Remove this search from favorites",
+
+ "docsearch.errorScreen.titleText": "Unable to fetch results",
+ "docsearch.errorScreen.helpText": "You might want to check your network connection.",
+
+ "docsearch.footer.selectText": "to select",
+ "docsearch.footer.selectKeyAriaLabel": "Enter key",
+ "docsearch.footer.navigateText": "to navigate",
+ "docsearch.footer.navigateUpKeyAriaLabel": "Arrow up",
+ "docsearch.footer.navigateDownKeyAriaLabel": "Arrow down",
+ "docsearch.footer.closeText": "to close",
+ "docsearch.footer.closeKeyAriaLabel": "Escape key",
+ "docsearch.footer.searchByText": "Search by",
+
+ "docsearch.noResultsScreen.noResultsText": "No results for",
+ "docsearch.noResultsScreen.suggestedQueryText": "Try searching for",
+ "docsearch.noResultsScreen.reportMissingResultsText": "Believe this query should return results?",
+ "docsearch.noResultsScreen.reportMissingResultsLinkText": "Let us know."
+ }
+ ```