Copy as Markdown[View as Markdown](/docs/sdk/functions/getCustomDoc.md)

***

# Function: getCustomDoc()

> **getCustomDoc**(`directory`): (`filePath`) => `Promise`<`CustomDoc`>

Defined in: custom-docs.ts:24

Returns a custom doc from EventCatalog by the given file path.

## Parameters[​](#parameters "Direct link to Parameters")

| Parameter   | Type     |
| ----------- | -------- |
| `directory` | `string` |

## Returns[​](#returns "Direct link to Returns")

`Function`

### Parameters[​](#parameters-1 "Direct link to Parameters")

| Parameter  | Type     |
| ---------- | -------- |
| `filePath` | `string` |

### Returns[​](#returns-1 "Direct link to Returns")

`Promise`<`CustomDoc`>

## Example[​](#example "Direct link to Example")

```
import utils from '@eventcatalog/utils';

const { getCustomDoc } = utils('/path/to/eventcatalog');

// Gets the custom doc by the given file path
const customDoc = await getCustomDoc('/guides/inventory-management.mdx');
```
