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

Add docs for fields.markdoc.inline and fields.mdx.inline #1260

Merged
merged 1 commit into from
Aug 6, 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
21 changes: 21 additions & 0 deletions docs/src/content/pages/fields/markdoc.mdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
21 changes: 21 additions & 0 deletions docs/src/content/pages/fields/mdx.mdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Loading