docs: adds custom anchor tags to docs with duplicate headings (#9521)

### What?
Adds custom anchor tags to docs where duplicate headings exist.

### Why?
Anchor links would not correctly navigate to the proper point on the
page if there were multiple headings with the same string.

### How?
The website now supports adding custom `#anchor` to a heading in
markdown that will attach to the headings and table of content list
items. This PR adds custom anchors to the docs that have duplicate
headings.

**Example:**
```md
/docs/upload/storage-adapters.mdx

### Usage#vercel-blob-installation
```
Generates the path:
`/docs/upload/storage-adapters#vercel-blob-installation`
This commit is contained in:
Tylan Davis
2024-11-25 16:31:08 -05:00
committed by GitHub
parent b5f89d5199
commit aa26312b96
4 changed files with 32 additions and 32 deletions

View File

@@ -102,7 +102,7 @@ const post = await payload.find({
The following Collection operations are available through the Local API:
### Create
### Create#collection-create
```js
// The created Post document is returned
@@ -134,7 +134,7 @@ const post = await payload.create({
})
```
### Find
### Find#collection-find
```js
// Result will be a paginated set of Posts.
@@ -155,7 +155,7 @@ const result = await payload.find({
})
```
### Find by ID
### Find by ID#collection-find-by-id
```js
// Result will be a Post document.
@@ -171,7 +171,7 @@ const result = await payload.findByID({
})
```
### Count
### Count#collection-count
```js
// Result will be an object with:
@@ -187,7 +187,7 @@ const result = await payload.count({
})
```
### Update by ID
### Update by ID#collection-update-by-id
```js
// Result will be the updated Post document.
@@ -219,7 +219,7 @@ const result = await payload.update({
})
```
### Update Many
### Update Many#collection-update-many
```js
// Result will be an object with:
@@ -258,7 +258,7 @@ const result = await payload.update({
})
```
### Delete
### Delete#collection-delete
```js
// Result will be the now-deleted Post document.
@@ -275,7 +275,7 @@ const result = await payload.delete({
})
```
### Delete Many
### Delete Many#collection-delete-many
```js
// Result will be an object with:
@@ -394,7 +394,7 @@ const result = await payload.verifyEmail({
The following Global operations are available through the Local API:
### Find
### Find#global-find
```js
// Result will be the Header Global.
@@ -409,7 +409,7 @@ const result = await payload.findGlobal({
})
```
### Update
### Update#global-update
```js
// Result will be the updated Header Global.