> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/ja-gitbook-documentation/getting-started/import.md).

# GitBook に移行する

インポートツールを使用して、GitBook で既存のドキュメントを移行し、統合できます。

内蔵のインポートツールを使って 1 ページまたは複数ページをインポートすることもできます — あるいは [Git Sync を使って Git リポジトリ全体をインポートできます](#import-using-git-sync).

## インポートパネルの使用

インポートパネルを使うと、別のドキュメントサイトや既存のファイルから、コンテンツを GitBook の組織に簡単に移行できます。

別のオンラインドキュメントサイトからインポートする場合は、サイトの URL を追加するだけで、あとは GitBook が処理します。

既定では、GitBook はインポート処理を効率化するために AI を使用します。これにより、GitBook の形式に完全には一致しないインポート済みコンテンツが賢く洗練され、整理されます。そのため、出力はより洗練され、GitBook のブロックをより効果的に使用できます。これをメニューから無効にできます。

### 対応しているインポート形式

GitBook は、次の形式のドキュメントサイトまたはファイルからのインポートをサポートしています:

* Markdown（`.md` または `.markdown`)
* HTML（`.html`)
* Microsoft Word（`.docx`)

GitBook は次からのインポートにも対応しています:

* Confluence
* Notion
* GitHub Wiki
* Quip
* Dropbox Paper
* Google ドキュメント

次のことをしたい場合は、 **複数ページをインポート**、HTML または Markdown ファイルを含む ZIP ファイルをアップロードするか、 **オンラインドキュメント** のインポートオプションを使用できます。

{% hint style="info" %}
GitBook は Markdown ベースなので、Markdown 形式でコンテンツをインポートすると最良の結果が得られます。現在お使いのツールが Markdown でのエクスポートに対応している場合は、よりスムーズなインポート処理のためにその形式を使用することをおすすめします。
{% endhint %}

### インポートパネル

<figure><img src="/files/abe518d533723e90a3131a5c1ea3a3dba567ae43" alt="A GitBook screenshot showing the import panel"><figcaption><p>GitBook のインポートパネル。</p></figcaption></figure>

新しいセクションを作成すると、表示されるモーダルでコンテンツをインポートするオプションがあります。空のセクションを作成した場合は、次を使ってインポートすることもできます **クイックスタート** 新しい空のページの下部にあるセクション **編集**.

または、次を選択していつでもページやサブページをインポートできます **新規追加** > **ページをインポート** の下部にある [目次](/docs/documentation/ja-gitbook-documentation/rifarensu/gitbook-ui.md#table-of-contents)、または **アクションメニュー** <picture><source srcset="/files/YjlF3Z9KMYv9aQiFzZKD" media="(prefers-color-scheme: dark)"><img src="/files/3489a3405c2f5c8e7f31c02ff44e42d2e3e8dbf6" alt="The Actions menu icon in GitBook"></picture> ページのメニューを開き、次を選択して **サブページをインポート**.

入力元を選択したら、インポートしたいファイルを選択できます。

{% hint style="warning" %}
GitBook はさまざまなソースからコンテンツをインポートしますが、製品機能やドキュメント形式の違いにより、元のソースと比べてインポートされたコンテンツに差異が生じる場合があります。
{% endhint %}

### 制限事項

現在、GitBook のインポート済みコンテンツには次の制限があります:

* 1 回のインポートでアップロードできるページの最大数は **20**.
* 1 回のインポートでアップロードできるファイル数（画像など）の最大数は **20**.

GitBook ではこれらのインポート上限を引き上げることはできません。より多くのコンテンツを一度にインポートするには、 [Git Sync](/docs/documentation/ja-gitbook-documentation/docs-as-code/git-sync.md)を使用してください。最大 5,000 件の Markdown ページに対応しています。

***

## Git Sync を使用して GitHub または GitLab のリポジトリからインポートする <a href="#import-using-git-sync" id="import-using-git-sync"></a>

大量のコンテンツを GitBook にインポートする場合は、次を使用することをおすすめします [Git Sync](/docs/documentation/ja-gitbook-documentation/docs-as-code/git-sync.md)。内蔵の移行ツールでもほとんどのインポートには対応できますが、より大規模な移行を効率的に処理するには Git Sync の方が適しています。

{% hint style="info" %}
コンテンツをインポートするための基本手順は以下にあります。より詳細な手順と動画デモについては、次の専用ガイドをご覧ください: [Git Sync を使ってコンテンツを GitBook にインポートする](/docs/guides/editing-and-publishing-documentation/import-or-migrate-your-content-to-gitbook-with-git-sync.md).
{% endhint %}

{% stepper %}
{% step %}
**コンテンツを Markdown に変換する**

GitBook は Markdown ベースなので、Markdown 形式でコンテンツをインポートすると最良の結果が得られます。現在お使いのツールが Markdown でのエクスポートに対応している場合は、よりスムーズなインポート処理のためにその形式を使用することをおすすめします。

コンテンツがすでに Markdown ファイルでない場合は、次のようなスクリプトを使用することをおすすめします [Markitdown](https://github.com/microsoft/markitdown)）またはオンラインツールを使ってコンテンツを変換してください。
{% endstep %}

{% step %}
**GitHub または GitLab でコンテンツを整理する**

GitBook サイトを設定する際は、GitHub または GitLab のリポジトリ内でコンテンツを効率的に整理することが重要です。Git Sync はセクション単位で行われるため、コンテンツをどのようにグループ化するかを慎重に計画してください。必要な Markdown ファイルが正しい場所にあるように、複数のリポジトリまたはフォルダを作成してください。
{% endstep %}

{% step %}
**セクションを設定して Git Sync を構成する**

コンテンツを整理するには、必要に応じて GitBook に 1 つ以上のセクションを作成します。次をインストールします [GitHub Sync](https://www.gitbook.com/integrations/github-sync) または [GitLab Sync](https://www.gitbook.com/integrations/gitlab-sync) を組織に導入し、それらのセクション用に設定します。セクションを、前の手順で用意したフォルダまたはリポジトリと同期する必要があります。
{% endstep %}

{% step %}
**GitHub → GitBook の方向で Git Sync を実行する**

設定手順を進める際は、必ず GitHub → GitBook の方向を選択してください。これにより、フォルダまたはリポジトリの内容が GitHub または GitLab から GitBook に取り込まれます。
{% endstep %}
{% endstepper %}

## コンテンツをエクスポートする

GitBook のコンテンツは次の 2 通りの方法でエクスポートできます:

* **Markdown として**、Git リポジトリと同期する方法です。アプリには Markdown を直接エクスポートする機能はありません — エクスポートしたいセクションを、空の GitHub または GitLab リポジトリと次を使って同期してください [Git Sync](/docs/documentation/ja-gitbook-documentation/docs-as-code/git-sync.md)。すると、そのリポジトリが Markdown エクスポートになります。一部のブロックには Markdown の表現がなく、エクスポートでは HTML として表示されます。
* **PDF として**、ページまたはセクションの［アクション］メニューから行えます。参照: [PDFエクスポート](/docs/documentation/ja-gitbook-documentation/gong-kai/pdf-export.md)。非常に大きなセクションをエクスポートする際には制限に達する場合があります。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/documentation/ja-gitbook-documentation/getting-started/import.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
