Nuxt content with layers
If I have layers, some of them are using nuxt content, can those define content.config.ts or I need to define the content config differently inside layers? The app itself would define the content.config.ts too.
7 Replies
Hi @BenG. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The knowledge sources do not explicitly mention how Nuxt Content's configuration (content.config.ts) is handled when using multiple layers, each potentially with its own content.config.ts, alongside an app-level content.config.ts.
Based on the available information, there is no clear documentation or example showing whether each layer can have its own content.config.ts that will be automatically merged or respected by Nuxt Content, or if you must define all content configuration in the app’s root content.config.ts.
Therefore, I cannot provide a definitive answer on whether you can define content.config.ts inside each layer or if you need to handle the configuration differently. If you need a precise answer, I recommend checking the official Nuxt Content documentation or opening an issue in the Nuxt Content repository for clarification, as the current knowledge sources do not cover this scenario.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
<@371347799255547916> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@kapa.ai Can I define the content.config.ts configs in the nuxt config in content v3? If so how?
Let me check the knowledge base for you again. One moment! :books:
----------------------
I'm sorry, but the knowledge sources do not contain information about defining Nuxt Content (content.config.ts) configuration directly inside nuxt.config.ts for Content v3. There are no examples or documentation in the provided sources that show how (or if) you can inline content config within nuxt.config.ts, or whether you must use a separate content.config.ts file.
If you need a definitive answer, I recommend consulting the official Nuxt Content documentation or repository, as this specific scenario is not covered in the knowledge sources provided.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
<@371347799255547916> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Layers can define content.config.ts — each layer with Nuxt Content can have its own content.config.ts.
Yes, the sources with the dir was the issue when I tried that approach