メインコンテンツまでスキップ

ドキュメントの作成

ドキュメントは複数のページで構成されており、次の方法でアクセス出来ます。

  • サイドバー
  • 前/次のナビゲーション
  • バージョン管理

最初のドキュメントを作成する

次のパスにマークダウンファイルを作成 docs/hello.md:

docs/hello.md
# Hello

This is my **first Docusaurus document**!

新しいドキュメントは次の場所で入手できます。 http://localhost:3000/docs/hello.

サイドバーを構成する

Docusaurusはdocsフォルダーから自動的にサイドバーを作成します。

メタデータを追加してサイドバーのラベルと位置をカスタマイズします。

docs/hello.md
---
sidebar_label: 'Hi!'
sidebar_position: 3
---

# Hello

This is my**first Docusaurus document**!

sidebars.jsでサイドバーを明示的に作成することもできます。

sidebars.js
export default {
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
};