From 1d914f9b32dd867a254d860ea19e514af91abfa9 Mon Sep 17 00:00:00 2001 From: Shinya Fujino Date: Mon, 19 Feb 2024 23:42:08 +0900 Subject: i18n(ja): Update customization.mdx (#1526) --- docs/src/content/docs/ja/guides/customization.mdx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/src/content/docs/ja/guides/customization.mdx b/docs/src/content/docs/ja/guides/customization.mdx index c568f194..662d929f 100644 --- a/docs/src/content/docs/ja/guides/customization.mdx +++ b/docs/src/content/docs/ja/guides/customization.mdx @@ -267,6 +267,25 @@ hero: --- ``` +### デフォルトの404ページを無効にする + +完全にカスタマイズされた404レイアウトがプロジェクトに必要な場合は、`src/pages/404.astro`ルートを作成し、Starlightのデフォルトルートを無効にするために[`disable404Route`](/ja/reference/configuration/#disable404route)オプションを設定します。 + +```js {9} +// astro.config.mjs +import { defineConfig } from 'astro/config'; +import starlight from '@astrojs/starlight'; + +export default defineConfig({ + integrations: [ + starlight({ + title: '404をカスタマイズしたドキュメント', + disable404Route: true, + }), + ], +}); +``` + ## カスタムフォント デフォルトでは、Starlightはユーザーのローカルデバイスで利用可能なサンセリフフォントをすべてのテキストに使用します。これにより、大きなフォントファイルをダウンロードするための余分な帯域幅を必要とせず、各ユーザーに馴染みのあるフォントでドキュメントを高速に読み込むことができます。 -- cgit