> 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/kontentsuwosuru/blocks/heading.md).

# 見出し

ページに見出しブロックを追加して、コンテンツを整理し、SEO を向上させます

見出しはドキュメントに構造を与えるのに役立ちます。また、見出しにキーワードを使うと、検索エンジンがその構造を理解しやすくなり、検索結果でページの順位が上がる助けにもなります。

GitBook には 3 つの見出しレベルがあります。見出しレベル 1（H1）と 2（H2）は、 [ページのアウトライン](/docs/documentation/ja-gitbook-documentation/rifarensu/gitbook-ui.md#page-outline).

### アンカーリンク

ページに見出しを追加すると、アンカーリンクが作成されます。すると、関連情報を示すために、これらの特定のセクションへ直接リンクできます。

#### アンカーへのリンク

公開コンテンツ、または読み取り専用モードの非公開コンテンツでは、タイトルにカーソルを合わせて、隣に表示される `#` をクリックすると、アンカーリンクを確認できます。これによりブラウザ上部の URL が更新されるので、コピーして他の場所で使用できます。

セクション内のページから特定のアンカーにリンクしたい場合は、 [相対リンク](/docs/documentation/ja-gitbook-documentation/kontentsuwosuru/formatting/inline.md#relative-links)を使用できます。見出しを変更してもリンク切れを防ぐため、これは自動的に更新されます。

#### アンカーを編集

既定では、アンカーリンクはヘッダーのテキストと同じになります。その URL を GitBook の外でリンク先に使う予定がある場合、後でヘッダーを変更するとアンカーリンクが壊れます。その場合、リンクはアンカーの場所ではなく、ページの先頭へ訪問者を移動させます。

これを避けるには、ヘッダーの **オプションメニュー** <picture><source srcset="/files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FaS1QvPIBVYwhpFTGcPBN%2Foptions-menu.svg?alt=media&amp;token=3ee40bbf-f4fb-41fa-aa30-306b559cbe88" alt="The Options menu icon in GitBook"></picture> を開いてから **アンカーを編集**を選ぶことで、アンカーリンクを手動で設定できます。その後、使いたいアンカーリンクを入力できます。ヘッダー自体を変更しても、このアンカーはそのまま残ります。

### Markdownでの表記

GitBook は SEO に最適化されたページを生成します。つまり、GitBook のページタイトルは markdown では自動的に第 1 レベルの見出しとして表現されます:

```markdown
# ページタイトルです
```

つまり、もし [Git とコンテンツを同期すると](/docs/documentation/ja-gitbook-documentation/docs-as-code/git-sync.md)、エディターで追加されたページ見出しは 1 レベル下として表現されます:

{% code overflow="wrap" %}

```markdown
## 私の見出し 1
### 私の見出し 2
#### 私の見出し 3
```

{% endcode %}

### 見出しの例 <a href="#example-of-a-heading" id="example-of-a-heading"></a>

## 私の見出し 1

### 私の見出し 2

#### 私の見出し 3

{% hint style="info" %}
ページタイトルは、ページ本文内の見出しブロックとは別です。でページタイトルを非表示にすると **ページオプション**、H1、H2、H3 の見出しは引き続き表示されます。
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/ja-gitbook-documentation/kontentsuwosuru/blocks/heading.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
