You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I upgraded @nuxt/content from v2 to v3 and noticed that the components under components/content no longer have global: true. Why is that? Since I usually use the <MDC />, in v2 it was set to global: true by default. With v3, I have to set global: true for the <MDC /> in nuxt.config.ts.
The code in the source code(v3):
Feature Request: Custom Collections in content.config.ts
I propose adding a feature to content.config.ts where the defineCollection method supports a type: 'custom' option. This would allow @nuxt/content to initialize table structures based on the schema and manage document metadata accordingly:
If the table does not exist in the SQLite database, @nuxt/content should initialize it automatically. This ensures that the querying logic remains consistent:
Upgrade from
@nuxt/content
v2
tov3
Recently, I upgraded
@nuxt/content
fromv2
tov3
and noticed that the components undercomponents/content
no longer haveglobal: true
. Why is that? Since I usually use the<MDC />
, inv2
it was set toglobal: true
by default. Withv3
, I have to setglobal: true
for the<MDC />
innuxt.config.ts
.The code in the source code(
v3
):Feature Request: Custom Collections in
content.config.ts
I propose adding a feature to
content.config.ts
where thedefineCollection
method supports atype: 'custom'
option. This would allow@nuxt/content
to initialize table structures based on theschema
and manage document metadata accordingly:If the table does not exist in the SQLite database,
@nuxt/content
should initialize it automatically. This ensures that the querying logic remains consistent:Here are the optimized management methods for content operations:
Here's how you can use the management methods in your code:
The text was updated successfully, but these errors were encountered: