mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-15 12:43:27 +09:00
changed the content folder structure && fixed breadcrumps
This commit is contained in:
Executable
+11
@@ -0,0 +1,11 @@
|
||||
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;
|
||||
@@ -6,4 +6,4 @@ image: "/images/avatar.png"
|
||||
draft: false
|
||||
---
|
||||
|
||||
L'entreprise elle-même est une entreprise très prospère. Ils ne connaissent pas les bienfaits du corps, ou sauf qu'ils le recevront à d'autres moments, le tout, les temps de travail, qu'il déteste à partir de ce moment mais. Il fuit les plaisirs perçus pour être supposés n'être rien, tout ou, et la douleur est ce qui est la plus grande option, car cela lui est facile, et avec ce que cela s'ensuit, ils lui procurent de la douleur et ainsi de suite ! Car ledit expédient de la vérité repousse le plaisir et empêche la douleur, ils fournissent comme si
|
||||
L'entreprise elle-même est une entreprise très prospère. Ils ne connaissent pas les bienfaits du corps, ou sauf qu'ils le recevront à d'autres moments, le tout, les temps de travail, qu'il déteste à partir de ce moment mais. Il fuit les plaisirs perçus pour être supposés n'être rien, tout ou, et la douleur est ce qui est la plus grande option, car cela lui est facile, et avec ce que cela s'ensuit, ils lui procurent de la douleur et ainsi de suite ! Car ledit expédient de la vérité repousse le plaisir et empêche la douleur, ils fournissent comme si
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
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,
|
||||
};
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
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,
|
||||
};
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
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,
|
||||
};
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
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,
|
||||
};
|
||||
@@ -50,4 +50,4 @@ features:
|
||||
enable: false
|
||||
label: ""
|
||||
link: ""
|
||||
---
|
||||
---
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
import { defineCollection, z } from "astro:content";
|
||||
|
||||
const elementsCollection = defineCollection({
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
meta_title: z.string().optional(),
|
||||
description: z.string(),
|
||||
draft: z.boolean().optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
const privacyCollection = defineCollection({
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
meta_title: z.string().optional(),
|
||||
description: z.string(),
|
||||
draft: z.boolean().optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = {
|
||||
elements: elementsCollection,
|
||||
privacy: privacyCollection,
|
||||
};
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
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,
|
||||
};
|
||||
Reference in New Issue
Block a user