Jamdesk Documentation logo

标题

使用 H2 和 H3 标题组织页面,自动填充右侧目录并生成可分享的锚点链接。

Markdown 标题(#####)可将页面划分为便于读者快速浏览的章节。Jamdesk 会识别 H2 和 H3 标题以生成右侧 Table of Contents,并创建可直接分享的锚点链接。

基本用法

使用标准 Markdown 标题组织内容:

## Section Title

Content goes here...

### Subsection

More detailed content...

H2 和 H3 标题会显示在右侧 Table of Contents 中,读者可在长页面的不同章节之间跳转。

锚点链接

每个标题都会根据其文本自动生成锚点 ID:

标题生成的锚点
## Getting Started#getting-started
## API Reference#api-reference
### User Authentication#user-authentication

分享标题链接

将鼠标悬停在任意 H2 或 H3 标题上,可显示 link icon。这样可以轻松分享指向特定章节的直接链接:

  • Click the link icon 可将 URL 复制到剪贴板
  • Click the header text 可复制 URL 并导航至该章节

link icon 显示在标题左侧的小型带边框方框中。复制链接时,图标会短暂变色以确认操作。

在移动设备上,link icon 会被隐藏,因为没有悬停状态。 标题仍可正常用于导航。

链接到标题

使用锚点从其他页面引用特定章节:

See the [headings section](/content/mdx-basics#headings) for details.

最佳实践

主章节使用 H2,子章节使用 H3:

## Installation

### Prerequisites

### Quick Install

## Configuration

### Basic Options

### Advanced Options

避免跳过层级(例如从 H2 直接跳到 H4)。

简短的标题更易于浏览:

{/* Good */}
## Authentication

{/* Avoid */}
## How to Set Up Authentication in Your Application

仅将第一个单词和专有名词大写:

{/* Good */}
## Getting started with the API

{/* Avoid */}
## Getting Started With The API

后续内容

SEO 优化

改善内容发现和元数据

前置元数据

定义标题、描述和 SEO 字段