diff --git a/docs/src/content/pages/fields/markdoc.mdoc b/docs/src/content/pages/fields/markdoc.mdoc index 149ddde1a..82d5cb7e1 100644 --- a/docs/src/content/pages/fields/markdoc.mdoc +++ b/docs/src/content/pages/fields/markdoc.mdoc @@ -55,6 +55,27 @@ Checkout the [content components](/docs/content-components) docs to learn how to --- +## Inline + +By default, `fields.markdoc` will output content in a seperate file to the main data or below the main data if using `format.contentField`. If you want to have multiple pieces of content in the same file, you can use `fields.markdoc.inline(...)`: + +```tsx +someContent: fields.markdoc.inline({ + label: 'Some content', +}) +``` + +this will write content next to other fields like this instead of in a different file: + +```yaml +someContent: | + # Title + + Some content +``` + +--- + ## 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 50ec59ebf..4e0bfc85e 100644 --- a/docs/src/content/pages/fields/mdx.mdoc +++ b/docs/src/content/pages/fields/mdx.mdoc @@ -104,6 +104,27 @@ For example... --- +## Inline + +By default, `fields.mdx` will output content in a seperate file to the main data or below the main data if using `format.contentField`. If you want to have multiple pieces of content in the same file, you can use `fields.mdx.inline(...)` instead: + +```tsx +someContent: fields.mdx.inline({ + label: 'Some content', +}) +``` + +this will write content next to other fields like this instead of in a different file: + +```yaml +someContent: | + # Title + + Some content +``` + +--- + ## 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)