Order articles by date DESC
This commit is contained in:
+13
-7
@@ -1,13 +1,19 @@
|
||||
import { defineContentConfig, defineCollection } from '@nuxt/content'
|
||||
import { defineContentConfig, defineCollection, z } from '@nuxt/content'
|
||||
|
||||
// Lookup resolved from path: rootDir/content
|
||||
// see: https://github.com/nuxt/content/issues/3161
|
||||
|
||||
export default defineContentConfig({
|
||||
collections: {
|
||||
content: defineCollection({
|
||||
type: "page",
|
||||
source: "**/*.md"
|
||||
})
|
||||
}
|
||||
collections: {
|
||||
content: defineCollection({
|
||||
type: "page",
|
||||
source: "**/*.md",
|
||||
schema: z.object({
|
||||
date: z.date(),
|
||||
img: z.string(),
|
||||
sub: z.string(),
|
||||
tags: z.array(z.string()),
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user