Skip to content

Commit

Permalink
docs: update module options (#1755)
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Dec 15, 2022
1 parent 600e349 commit e7d11d7
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions docs/content/4.api/3.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@ export default defineNuxtConfig({
})
```

## `base`
## `api`

- Type: `String`{lang=ts}
- Default: `'/_content'`{lang=ts}
- Type: `Record<String, any>`{lang=ts}
- Default: `{ baseURL: '/api/_content' }`{lang=ts}

Change default behaviour of Content APIs.

Base route that will be used for content api.
- `baseURL`{lang=ts}: change the base URL of Content APIs. Default is `/api/_content`.

```ts [nuxt.config.ts]
export default defineNuxtConfig({
content: {
base: '/_content'
api: {
baseURL: '/api/_my_content'
}
}
})
```
Expand Down Expand Up @@ -313,6 +317,10 @@ List of locale codes. This codes will be used to detect contents locale.

Default locale for top level contents. Module will use first locale code from `locales` array if this option is not defined.

::alert
Note that in case of defining multiple locales, Module will filter content with `defaultLocale`. If you want to fetch contents of another locale, you need to use `where` option.
::

## `documentDriven`

- Type: `Boolean | Object`{lang=ts}
Expand Down

0 comments on commit e7d11d7

Please sign in to comment.