diff --git a/docs/src/content/docs/ja/guides/customization.mdx b/docs/src/content/docs/ja/guides/customization.mdx index c568f1944a4..662d929f493 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はユーザーのローカルデバイスで利用可能なサンセリフフォントをすべてのテキストに使用します。これにより、大きなフォントファイルをダウンロードするための余分な帯域幅を必要とせず、各ユーザーに馴染みのあるフォントでドキュメントを高速に読み込むことができます。