# buildSourceMap (/docs/api/functions/buildSourceMap)



```ts
function buildSourceMap(
   ctx, 
   body, 
   options): SourceMap;
```

Defined in: [packages/core/src/sourcemap.ts:133](https://github.com/austenstone/actio/blob/2b01e694a0f76521d8c073f3c6a2e48917d2c9d9/packages/core/src/sourcemap.ts#L133)

Reconstruct a line-level source map from the original document and the
emitted body. `body` must be the generated YAML *without* the banner.

## Parameters [#parameters]

### ctx [#ctx]

[`ParseContext`](../interfaces/ParseContext.mdx)

### body [#body]

`string`

### options [#options]

[`BuildSourceMapOptions`](../interfaces/BuildSourceMapOptions.mdx)

## Returns [#returns]

[`SourceMap`](../interfaces/SourceMap.mdx)


## Sitemap

Browse the full documentation: [Markdown sitemap](https://austenstone.github.io/actio/sitemap.md) · [XML sitemap](https://austenstone.github.io/actio/sitemap.xml)