nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.08k stars 624 forks source link

'defaultLocale' type missing in types #2547

Closed tiptronic closed 6 months ago

tiptronic commented 7 months ago

Environment


Reproduction

add this to nuxt.config.ts

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: ['@nuxt/content'],
  defaultLocale: 'de'
})

Describe the bug

Following the get started with content.nuxt, there are some types missing, e.g. trying to add defaultLocale shows an error (see screenshot)

CleanShot_2024-02-07_09 46 25

Additional context

More generally speaking: The getting started leaves some questions open... e.g. if you are about to get started, it is not really clear what a useContentHead composable is, or what default behaviour in Change default behaviour of Content APIs. means.

It would be nice, if the getting started provides steps which are possible to follow. As is, I'm lost, because it is unclear which of the configuration properties are required/supported to continue and which ones aren't.

Logs

No response

farnabaz commented 7 months ago

You should define defaultLocale under content options:

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: ['@nuxt/content'],
  content: {
    defaultLocale: 'de'
  }
})