first commit
This commit is contained in:
31
app/content.config.ts
Normal file
31
app/content.config.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { defineContentConfig, defineCollection, z } from '@nuxt/content'
|
||||
|
||||
export default defineContentConfig({
|
||||
collections: {
|
||||
landing: defineCollection({
|
||||
type: 'page',
|
||||
source: {
|
||||
// @ts-expect-error __DOCS_DIR__ is not defined
|
||||
cwd: globalThis.__DOCS_DIR__,
|
||||
include: 'index.md',
|
||||
},
|
||||
}),
|
||||
docs: defineCollection({
|
||||
type: 'page',
|
||||
source: {
|
||||
// @ts-expect-error __DOCS_DIR__ is not defined
|
||||
cwd: globalThis.__DOCS_DIR__,
|
||||
include: '**',
|
||||
exclude: ['index.md'],
|
||||
},
|
||||
schema: z.object({
|
||||
links: z.array(z.object({
|
||||
label: z.string(),
|
||||
icon: z.string(),
|
||||
to: z.string(),
|
||||
target: z.string().optional(),
|
||||
})).optional(),
|
||||
}),
|
||||
}),
|
||||
},
|
||||
})
|
Reference in New Issue
Block a user