-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: example links fixing + table of contents fixes (#9272)
- Loading branch information
1 parent
27845c8
commit 2569f79
Showing
30 changed files
with
149 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
url: https://github.com/aaronpowell/keystone-6-azure-example" | ||
title: Microsoft Azure | ||
kind: deployment | ||
url: https://github.com/aaronpowell/keystone-6-azure-example | ||
description: > | ||
Deploys a Keystone app backend to Microsoft Azure. Based on the `with-auth` project. **One-click deployment** included. | ||
Deploys a Keystone app backend to Microsoft Azure. Based on the `with-auth` | ||
project. **One-click deployment** included. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
title: Blog | ||
kind: standalone | ||
url: https://keystonejs.com/docs/guides/custom-admin-ui-navigation/usecase-blog | ||
url: https://github.com/keystonejs/keystone/tree/main/examples/usecase-blog | ||
description: > | ||
A basic Blog schema with Posts and Authors. Use this as a starting place for | ||
learning how to use Keystone. It’s also a starter for other feature projects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
title: Custom Admin UI Navigation | ||
url: https://keystonejs.com/docs/guides/custom-admin-ui-navigation | ||
url: https://github.com/keystonejs/keystone/tree/main/examples/custom-admin-ui-navigation | ||
kind: standalone | ||
description: > | ||
Adds a custom Navigation component to the Admin UI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
url: https://github.com/keystonejs/keystone-6-heroku-example" | ||
title: Heroku | ||
kind: deployment | ||
url: https://github.com/keystonejs/keystone-6-heroku-example | ||
description: > | ||
Based on the `with-auth` project, this example deploys a | ||
simple app backend to Heroku. Includes a **one-click deployment** for Heroku | ||
account holders. | ||
Based on the `with-auth` project, this example deploys a simple app backend to | ||
Heroku. Includes a **one-click deployment** for Heroku account holders. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
url: https://github.com/keystonejs/keystone-6-railway-example" | ||
title: Railway | ||
kind: deployment | ||
url: https://github.com/keystonejs/keystone-6-railway-example | ||
description: > | ||
Deploys a Keystone app backend to Railway. Based on the | ||
`with-auth` project. | ||
Deploys a Keystone app backend to Railway. Based on the `with-auth` project. | ||
**One-click deployment** included. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
|
||
|
||
import type { RenderableTreeNode, Tag } from '@markdoc/markdoc' | ||
import { isTag } from './isTag' | ||
|
||
export type HeadingType = { | ||
id: string | ||
depth: number | ||
label: string | ||
} | ||
|
||
export function extractHeadings (content: Tag): HeadingType[] { | ||
const headings: HeadingType[] = [] | ||
for (const child of content.children) { | ||
if (isTag(child) && child.name === 'Heading') { | ||
headings.push({ | ||
id: child.attributes.id, | ||
depth: child.attributes.level, | ||
label: stringifyDocContent(child), | ||
}) | ||
} | ||
} | ||
return headings | ||
} | ||
|
||
function stringifyDocContent (node: RenderableTreeNode): string { | ||
if (typeof node === 'string') { | ||
return node | ||
} | ||
if (Array.isArray(node)) { | ||
return node.map(stringifyDocContent).join('') | ||
} | ||
if (!isTag(node)) { | ||
return '' | ||
} | ||
return node.children.map(stringifyDocContent).join('') | ||
} |
Oops, something went wrong.