Skip to content

Commit

Permalink
Docs mdx/markdoc: Add sections on custom options (#1348)
Browse files Browse the repository at this point in the history
  • Loading branch information
tordans authored Nov 5, 2024
1 parent 35575f5 commit 5576ded
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
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)

0 comments on commit 5576ded

Please sign in to comment.