diff --git a/src/content/about/config.ts b/src/content/about/config.ts deleted file mode 100755 index 71ddbf1..0000000 --- a/src/content/about/config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { z } from "zod"; - -const AboutSchema = z.object({ - title: z.string(), - meta_title: z.string().optional(), - description: z.string().optional(), - image: z.string(), - draft: z.boolean().optional(), -}); - -export default AboutSchema; diff --git a/src/content/authors/config.ts b/src/content/authors/config.ts deleted file mode 100755 index d0eb2e1..0000000 --- a/src/content/authors/config.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { defineCollection, z } from "astro:content"; - -// Author collection schema -const authorsCollection = defineCollection({ - schema: z.object({ - title: z.string(), - meta_title: z.string().optional(), - email: z.string().optional(), - image: z.string().optional(), - description: z.string().optional(), - social: z - .array( - z - .object({ - name: z.string().optional(), - icon: z.string().optional(), - link: z.string().optional(), - }) - .optional(), - ) - .optional(), - draft: z.boolean().optional(), - }), -}); - -// Export collections -export const collections = { - authors: authorsCollection, -}; diff --git a/src/content/blog/config.ts b/src/content/blog/config.ts deleted file mode 100755 index e2f906b..0000000 --- a/src/content/blog/config.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { defineCollection, z } from "astro:content"; - -// Post collection schema -const blogCollection = defineCollection({ - schema: z.object({ - title: z.string(), - meta_title: z.string().optional(), - description: z.string().optional(), - date: z.date().optional(), - image: z.string().optional(), - author: z.string().default("Admin"), - categories: z.array(z.string()).default(["others"]), - tags: z.array(z.string()).default(["others"]), - draft: z.boolean().optional(), - }), -}); - -// Pages collection schema -const pagesCollection = defineCollection({ - schema: z.object({ - title: z.string(), - meta_title: z.string().optional(), - description: z.string().optional(), - image: z.string().optional(), - draft: z.boolean().optional(), - }), -}); - -// Export collections -export const collections = { - blog: blogCollection, - pages: pagesCollection, -}; diff --git a/src/content/config.ts b/src/content/config.ts index 6b926a5..c690a41 100755 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -1,6 +1,6 @@ import { defineCollection, z } from "astro:content"; -// Post collection schema +// Blog collection schema const blogCollection = defineCollection({ schema: z.object({ title: z.string(), @@ -49,9 +49,96 @@ const pagesCollection = defineCollection({ }), }); +// Contact collection schema +const contactCollection = defineCollection({ + schema: z.object({ + title: z.string(), + meta_title: z.string().optional(), + description: z.string(), + image: z.string().optional(), + draft: z.boolean().optional(), + }), +}); + +// About collection schema +const aboutCollection = defineCollection({ + schema: z.object({ + title: z.string(), + meta_title: z.string().optional(), + description: z.string().optional(), + image: z.string(), + draft: z.boolean().optional(), + }), +}); + +// Banner schema +const bannerSchema = z.object({ + title: z.string(), + content: z.string(), + image: z.string(), + button: z.object({ + enable: z.boolean(), + label: z.string(), + link: z.string(), + }), +}); + +// Features schema +const featureSchema = z.object({ + title: z.string(), + image: z.string(), + content: z.string(), + bulletpoints: z.array(z.string()), + button: z.object({ + enable: z.boolean(), + label: z.string().optional(), + link: z.string().optional(), + }), +}); + +// Content schema (for the main content structure with banner and features) +const contentSchema = z.object({ + banner: bannerSchema, + features: z.array(featureSchema), +}); + +// Content collection schema +const contentCollection = defineCollection({ + schema: contentSchema, +}); + +// Testimonial schema +const testimonialSchema = z.object({ + name: z.string(), + designation: z.string(), + avatar: z.string(), + content: z.string(), +}); + +// Testimonials schema +const testimonialsSchema = z.array(testimonialSchema); + +// Call to Action schema +const callToActionSchema = z.object({ + enable: z.boolean(), + title: z.string(), + image: z.string(), + description: z.string(), + button: z.object({ + enable: z.boolean(), + label: z.string(), + link: z.string().url(), + }), +}); + // Export collections export const collections = { blog: blogCollection, authors: authorsCollection, pages: pagesCollection, + contact: contactCollection, + about: aboutCollection, + content: contentCollection, + testimonials: testimonialsSchema, + callToAction: callToActionSchema, }; diff --git a/src/content/contact/config.ts b/src/content/contact/config.ts deleted file mode 100755 index 349b955..0000000 --- a/src/content/contact/config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { defineCollection, z } from "astro:content"; - -const contactCollection = defineCollection({ - schema: z.object({ - title: z.string(), - meta_title: z.string().optional(), - description: z.string(), - draft: z.boolean().optional(), - }), -}); - -export const collections = { - contact: contactCollection, -}; diff --git a/src/content/homepage/config.ts b/src/content/homepage/config.ts deleted file mode 100755 index 0262957..0000000 --- a/src/content/homepage/config.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { defineCollection, z } from "astro:content"; - -// Banner schema -const bannerSchema = z.object({ - title: z.string(), - content: z.string(), - image: z.string(), - button: z.object({ - enable: z.boolean(), - label: z.string(), - link: z.string(), - }), -}); - -// Features schema -const featureSchema = z.object({ - title: z.string(), - image: z.string(), - content: z.string(), - bulletpoints: z.array(z.string()), - button: z.object({ - enable: z.boolean(), - label: z.string().optional(), - link: z.string().optional(), - }), -}); - -// Main content schema -const contentSchema = z.object({ - banner: bannerSchema, - features: z.array(featureSchema), -}); - -// Define the collection -const contentCollection = defineCollection({ - schema: contentSchema, -}); - -// Export collections -export const collections = { - content: contentCollection, -}; diff --git a/src/content/sections/config.ts b/src/content/sections/config.ts deleted file mode 100755 index 1f49900..0000000 --- a/src/content/sections/config.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { z } from "zod"; - -const TestimonialSchema = z.object({ - name: z.string(), - designation: z.string(), - avatar: z.string(), - content: z.string(), -}); - -const TestimonialsSchema = z.array(TestimonialSchema); - -const CallToActionSchema = z.object({ - enable: z.boolean(), - title: z.string(), - image: z.string(), - description: z.string(), - button: z.object({ - enable: z.boolean(), - label: z.string(), - link: z.string().url(), - }), -}); - -export const collections = { - Testimonial: TestimonialSchema, - Testimonials: TestimonialsSchema, - CallToAction: CallToActionSchema, -};