Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions create/text.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@
Use descriptive, keyword-rich headers that clearly indicate the content that follows. This improves both user navigation and search engine optimization.
</Tip>

### Custom heading IDs

By default, anchor links are [auto-generated](/guides/linking#how-anchor-links-are-generated) from the heading text. You can override this with a custom ID using the `{#custom-id}` syntax:

```mdx
## My heading {#my-custom-id}
```

This sets the anchor link to `#my-custom-id` instead of the auto-generated `#my-heading`. Custom IDs work with heading levels 1 through 4.

Custom IDs are automatically slugified — spaces become hyphens, special characters are removed or converted, and underscores are preserved. For example, `{#my custom id}` produces `#my-custom-id`.

Check warning on line 35 in create/text.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/text.mdx#L35

Did you really mean 'slugified'?

Check warning on line 35 in create/text.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/text.mdx#L35

Don't put a space before or after a dash.

Check warning on line 35 in create/text.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/text.mdx#L35

In general, use active voice instead of passive voice ('are removed').

Check warning on line 35 in create/text.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/text.mdx#L35

In general, use active voice instead of passive voice ('are preserved').

If multiple headings share the same custom ID, a numeric suffix is appended to keep them unique (e.g. `#same-id`, `#same-id-2`, `#same-id-3`).

Check warning on line 37 in create/text.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/text.mdx#L37

In general, use active voice instead of passive voice ('is appended').

Check warning on line 37 in create/text.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/text.mdx#L37

Use 'for example' instead of 'e.g.'.

Custom heading IDs are useful when you want stable anchor links that don't change if you edit the heading text, or when auto-generated slugs don't produce the ID you want.

### Disabling anchor links

By default, headers include clickable anchor links that allow users to link directly to specific sections. You can disable these anchor links using the `noAnchor` prop in HTML or React headers.
Expand Down Expand Up @@ -64,8 +80,8 @@

```mdx
**_bold and italic_**
**~~bold and strikethrough~~**

Check warning on line 83 in create/text.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/text.mdx#L83

Use 'Strikethrough' instead of 'strikethrough'.
*~~italic and strikethrough~~*

Check warning on line 84 in create/text.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/text.mdx#L84

Use 'Strikethrough' instead of 'strikethrough'.
```

**_bold and italic_**<br />
Expand Down
8 changes: 8 additions & 0 deletions guides/linking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Internal links

Link to other pages in your documentation using root-relative paths. Root-relative paths start from the root of your documentation directory and work consistently regardless of where the linking page is located.

Check warning on line 11 in guides/linking.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/linking.mdx#L11

In general, use active voice instead of passive voice ('is located').

```mdx
* [Quickstart guide](/quickstart)
Expand Down Expand Up @@ -46,7 +46,7 @@
* [Customize your playground](/api-playground/overview#customize-your-playground)
* [Cards properties](/components/cards#properties)

### How anchor links are generated

Check warning on line 49 in guides/linking.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/linking.mdx#L49

In general, use active voice instead of passive voice ('are generated').

Anchor links are automatically created from header text.

Expand All @@ -61,6 +61,14 @@
| `### API Authentication` | `#api-authentication` |
| `#### Step 1: Install` | `#step-1-install` |

You can override the auto-generated anchor link by specifying a custom ID with the `{#custom-id}` syntax:

```mdx
## Step 2: Configure credentials {#configure-credentials}
```

This heading produces the anchor link `#configure-credentials` instead of the auto-generated `#step-2-configure-credentials`. See [Custom heading IDs](/create/text#custom-heading-ids) for more details.

<Note>
Headers with the `noAnchor` prop do not generate anchor links. See [Format text](/create/text#disabling-anchor-links) for details.
</Note>
Expand Down
Loading