[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/core](../../README) / [index](../README) / markdown

# Function: markdown()

> **markdown**(`content`, `options?`, `status?`): [`MarkdownBuilder`](../classes/MarkdownBuilder)

Defined in: [helpers/response.ts:336](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/helpers/response.ts#L336)

Render markdown content and set it as the current response.

Returns a `MarkdownBuilder` that can optionally chain `.withLayout(layoutFn, props)`
to re-render the content inside a custom layout. When `.withLayout()` is called it
replaces the plain markdown response set here with the layout-wrapped version.

## Parameters

### content

`string`

### options?

[`BunMarkdownOptions`](../../helpers/interfaces/BunMarkdownOptions) & `object`

### status?

`number` = `200`

## Returns

[`MarkdownBuilder`](../classes/MarkdownBuilder)

## Examples

```ts
— plain (backward-compatible)
markdown(content);
```

```ts
— with custom layout
return markdown(content, { title }).withLayout(Layout, { title });
```
