feat: Upgrade template based on projects made with it
Some checks failed
Build, check & Test / run (push) Failing after 42s

Signed-off-by: Florian Bouillon <f.bouillon@aptatio.com>
This commit is contained in:
2023-10-09 11:47:11 +02:00
parent bf06e41238
commit e26b4eb4a5
42 changed files with 934 additions and 136 deletions

View File

@ -1,15 +0,0 @@
// 1. Import utilities from `astro:content`
// import { defineCollection, z } from 'astro:content'
// 2. Define your collection(s)
// const docsCollection = defineCollection({
// type: 'content',
// schema: z.object({
// title: z.string()
// })
// })
// 3. Export a single `collections` object to register your collection(s)
// This key should match your collection directory name in "src/content"
// export const collections = {
// 'docs': docsCollection,
// };

29
src/content/config.ts.tmp Normal file
View File

@ -0,0 +1,29 @@
// 1. Import utilities from `astro:content`
import { defineCollection, z } from 'astro:content'
// 2. Define your collection(s)
const projectsCollection = defineCollection({
type: 'content',
schema: ({ image }) => z.object({
title: z.string(),
description: z.string().optional(),
image: image().optional(),
link: z.object({
href: z.string(),
rel: z.string().optional(),
text: z.string().optional(),
target: z.string().optional()
}).optional(),
disabled: z.string().optional(),
created: z.date().optional(),
updated: z.date().optional(),
techs: z.string().array().optional()
})
})
// 3. Export a single `collections` object to register your collection(s)
// This key should match your collection directory name in "src/content"
export const collections = {
projects: projectsCollection
}