content icon indicating copy to clipboard operation
content copied to clipboard

'defaultLocale' type missing in types

Open tiptronic opened this issue 1 year ago • 1 comments

Environment


  • Operating System: Darwin
  • Node Version: v20.6.1
  • Nuxt Version: 3.10.1
  • CLI Version: 3.10.0
  • Nitro Version: 2.8.1
  • Package Manager: [email protected]
  • Builder: -
  • User Config: devtools, modules, defaultLocale
  • Runtime Modules: @nuxt/[email protected]
  • Build Modules: -

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

tiptronic avatar Feb 07 '24 11:02 tiptronic

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'
  }
})

farnabaz avatar Feb 19 '24 11:02 farnabaz