summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Fujino2024-02-23 22:43:18 +0900
committerGitHub2024-02-23 14:43:18 +0100
commit9e5c4f3a1b64b452ac840a12a731e5bb076b381f (patch)
tree6af0338e8f56e81c13bc4e8e63cf8a5750aa10a8
parent8a0699b608cd0a9f1aa915f4e4122d0efa377424 (diff)
downloadIT.starlight-9e5c4f3a1b64b452ac840a12a731e5bb076b381f.tar.gz
IT.starlight-9e5c4f3a1b64b452ac840a12a731e5bb076b381f.tar.bz2
IT.starlight-9e5c4f3a1b64b452ac840a12a731e5bb076b381f.zip
i18n(ja): Update pages.mdx (#1551)
-rw-r--r--docs/src/content/docs/ja/guides/pages.mdx38
1 files changed, 29 insertions, 9 deletions
diff --git a/docs/src/content/docs/ja/guides/pages.mdx b/docs/src/content/docs/ja/guides/pages.mdx
index 2fb1fc5a..3742128f 100644
--- a/docs/src/content/docs/ja/guides/pages.mdx
+++ b/docs/src/content/docs/ja/guides/pages.mdx
@@ -96,15 +96,35 @@ import CustomComponent from './CustomComponent.astro';
- [`slug`](/ja/reference/frontmatter/#slug)プロパティはサポートされておらず、カスタムページのURLに基づいて自動的に設定されます。
- [`editUrl`](/ja/reference/frontmatter/#editurl)オプションは、編集リンクを表示するためのURLが必要です。
-- [`sidebar`](/ja/reference/frontmatter/#sidebar)プロパティはサポートされていません。Markdownのフロントマターでは、このオプションは[自動生成されるリンクグループ](/ja/reference/configuration/#sidebar)のカスタマイズを可能にしますが、`<StarlightPage />`コンポーネントを使用するページには適用されません。
-
-{/* ##### `sidebar` */}
-
-{/* **type:** `SidebarEntry[] | undefined` */}
-{/* **default:** the sidebar generated based on the [global `sidebar` config](/reference/configuration/#sidebar) */}
-
-{/* Provide a custom site navigation sidebar for this page. */}
-{/* If not set, the page will use the default global sidebar. */}
+- [自動生成されるリンクグループ](/ja/reference/configuration/#sidebar)にページを表示する方法をカスタマイズするための[`sidebar`](/ja/reference/frontmatter/#sidebar)フロントマタープロパティは利用できません。`<StarlightPage />`コンポーネントを使用するページはコレクションの一部ではなく、自動生成されるサイドバーグループには追加できません。
+
+##### `sidebar`
+
+**type:** `SidebarEntry[]`
+**default:** [グローバルな`sidebar`設定値](/ja/reference/configuration/#sidebar)に基づき生成されるサイドバー
+
+ページにカスタムのサイトナビゲーションサイドバーを設定します。未設定の場合、ページはデフォルトのグローバルサイドバーを使用します。
+
+たとえば以下のページは、ホームページへのリンクと星座へのリンクグループによりデフォルトのサイドバーをオーバーライドします。サイドバーの現在のページは`isCurrent`プロパティを使用して設定され、またリンクアイテムにオプションの`badge`が追加されています。
+
+```astro {3-13}
+<StarlightPage
+ frontmatter={{ title: 'オリオン座' }}
+ sidebar={[
+ { label: 'ホーム', href: '/' },
+ {
+ label: '星座',
+ items: [
+ { label: 'アンドロメダ座', href: '/andromeda/' },
+ { label: 'オリオン座', href: '/orion/', isCurrent: true },
+ { label: 'こぐま座', href: '/ursa-minor/', badge: 'スタブ' },
+ ],
+ },
+ ]}
+>
+ 何らかのコンテンツ。
+</StarlightPage>
+```
##### `hasSidebar`