Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs mdx: Add sections on custom options #1348

Merged
merged 2 commits into from
Nov 5, 2024
Merged
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
18 changes: 18 additions & 0 deletions docs/src/content/pages/fields/markdoc.mdoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,24 @@ someContent: |

---

## Formatting options

The editor can be customised to allow a range of formatting options. This is done via `options`.

See the type signature for `MarkdocEditorOptions` for the full set of options:
[https://docsmill.dev/npm/@keystatic/core@latest#/.fields.markdoc.MarkdocEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.markdoc.MarkdocEditorOptions)

---

## Image options

The directory where images are stored can be customised in the same way as [`fields.image`](/docs/fields/image) with `directory` and `publicPath`. Though unlike [`fields.image`](/docs/fields/image) outside the editor where image filenames are determined by the key in the schema where the field is, filenames for images in the editor can be customised directly in the editor.

See the type signature for `MarkdocEditorOptions.image` for the full set of options:
[https://docsmill.dev/npm/@keystatic/core@latest#/.fields.markdoc.MarkdocEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.markdoc.MarkdocEditorOptions)

---

## Type signature

Find the latest version of this field's type signature at: [https://docsmill.dev/npm/@keystatic/core#/.fields.markdoc](https://docsmill.dev/npm/@keystatic/core#/.fields.markdoc)
18 changes: 18 additions & 0 deletions docs/src/content/pages/fields/mdx.mdoc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,24 @@ someContent: |

---

## Formatting options

The editor can be customised to allow a range of formatting options. This is done via `options`.

See the type signature for `MDXEditorOptions` for the full set of options:
[https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions)

---

## Image options

The directory where images are stored can be customised in the same way as [`fields.image`](/docs/fields/image) with `directory` and `publicPath`. Though unlike [`fields.image`](/docs/fields/image) outside the editor where image filenames are determined by the key in the schema where the field is, filenames for images in the editor can be customised directly in the editor.

See the type signature for `MDXEditorOptions.image` for the full set of options:
[https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions)

---

## Type signature

Find the latest version of this field's type signature at: [https://docsmill.dev/npm/@keystatic/core#/.fields.mdx](https://docsmill.dev/npm/@keystatic/core#/.fields.mdx)
Loading