> 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）の見出しは、 [ページのアウトライン](https://gitbook.com/docs/documentation/ja-gitbook-documentation/rifarensu/gitbook-ui.md#page-outline).

### アンカーリンク

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

#### アンカーにリンクする

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

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

#### アンカーを編集する

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

これを避けるには、次の手順でアンカーリンクを手動で設定できます。 **オプションメニュー** <picture><source srcset="broken://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%2Fgit-blob-23f3e8f05326b0d239d32d28bba99c1d46f204f7%2F25_01_10_options_light.svg?alt=media" alt="The Options menu icon in GitBook"></picture> 見出しの **アンカーを編集**を選択します。その後、使用するアンカーリンクを入力できます。見出し自体を変更しても、アンカーはそのまま保持されます。

#### 保護されたアンカー用語

GitBook は、広告ブロッカーによって一般的にブロックされる用語を含む生成アンカーを調整します。これにより、広告ブロッカーが見出しを非表示にしたり、そのリンクを壊したりするのを防ぎます。

たとえば、「Advertise」を含む見出しからは、次のアンカーが生成されることがあります。 `#never-a-dvertise`。「Advertising」を含む見出しからは、次のアンカーが生成されることがあります。 `#a-dvertising`.

見出しにリンクする際は、生成された URL を使用してください。また、 **アンカーを編集**.

### Markdownでの表現

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

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

つまり、 [コンテンツを Git と同期](https://gitbook.com/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.
