Skip to content

Commit e7d11d7

Browse files
authored
docs: update module options (#1755)
1 parent 600e349 commit e7d11d7

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

docs/content/4.api/3.configuration.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@ export default defineNuxtConfig({
1414
})
1515
```
1616

17-
## `base`
17+
## `api`
1818

19-
- Type: `String`{lang=ts}
20-
- Default: `'/_content'`{lang=ts}
19+
- Type: `Record<String, any>`{lang=ts}
20+
- Default: `{ baseURL: '/api/_content' }`{lang=ts}
21+
22+
Change default behaviour of Content APIs.
2123

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

2426
```ts [nuxt.config.ts]
2527
export default defineNuxtConfig({
2628
content: {
27-
base: '/_content'
29+
api: {
30+
baseURL: '/api/_my_content'
31+
}
2832
}
2933
})
3034
```
@@ -313,6 +317,10 @@ List of locale codes. This codes will be used to detect contents locale.
313317

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

320+
::alert
321+
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.
322+
::
323+
316324
## `documentDriven`
317325

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

0 commit comments

Comments
 (0)