From 5576ded0e21085fa76660d14e7574383decc6dc9 Mon Sep 17 00:00:00 2001 From: Tobias Date: Wed, 6 Nov 2024 00:56:31 +0100 Subject: [PATCH] Docs mdx/markdoc: Add sections on custom `options` (#1348) --- docs/src/content/pages/fields/markdoc.mdoc | 18 ++++++++++++++++++ docs/src/content/pages/fields/mdx.mdoc | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/docs/src/content/pages/fields/markdoc.mdoc b/docs/src/content/pages/fields/markdoc.mdoc index 82d5cb7e1..9b901e512 100644 --- a/docs/src/content/pages/fields/markdoc.mdoc +++ b/docs/src/content/pages/fields/markdoc.mdoc @@ -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) diff --git a/docs/src/content/pages/fields/mdx.mdoc b/docs/src/content/pages/fields/mdx.mdoc index 4e0bfc85e..520199378 100644 --- a/docs/src/content/pages/fields/mdx.mdoc +++ b/docs/src/content/pages/fields/mdx.mdoc @@ -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)