feat: initialize HEC IA Wiki with Docker setup, build process, and content structure
- Add .dockerignore t - Create Gitea Action to build and publish image - Update Dockerfile to include build steps and health check - Revise README.md - Modify config.ts for site-specific settings - Enhance content.config.ts to define collections for events, workshops, news, and technical articles
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
export const SITE = {
|
||||
website: "https://astro-paper.pages.dev/", // replace this with your deployed domain
|
||||
author: "Sat Naing",
|
||||
profile: "https://satnaing.dev/",
|
||||
desc: "A minimal, responsive and SEO-friendly Astro blog theme.",
|
||||
title: "AstroPaper",
|
||||
ogImage: "astropaper-og.jpg",
|
||||
website: "https://wiki.hec-ia.com/", // replace this with your deployed domain
|
||||
author: "HEC IA",
|
||||
profile: "https://wiki.hec-ia.com/about",
|
||||
desc: "HEC IA student association wiki - Events, workshops, news, and technical deep dives on artificial intelligence.",
|
||||
title: "HEC IA Wiki",
|
||||
ogImage: "hec-ia-og.jpg",
|
||||
lightAndDarkMode: true,
|
||||
postPerIndex: 4,
|
||||
postPerPage: 4,
|
||||
@@ -14,10 +14,10 @@ export const SITE = {
|
||||
editPost: {
|
||||
enabled: true,
|
||||
text: "Edit page",
|
||||
url: "https://github.com/satnaing/astro-paper/edit/main/",
|
||||
url: "https://github.com/hec-ia/wiki/edit/main/",
|
||||
},
|
||||
dynamicOgImage: true,
|
||||
dir: "ltr", // "rtl" | "auto"
|
||||
lang: "en", // html lang code. Set this empty and default will be "en"
|
||||
timezone: "Asia/Bangkok", // Default global timezone (IANA format) https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
timezone: "Europe/Paris", // Default global timezone (IANA format) https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
} as const;
|
||||
|
||||
@@ -3,6 +3,10 @@ import { glob } from "astro/loaders";
|
||||
import { SITE } from "@/config";
|
||||
|
||||
export const BLOG_PATH = "src/data/blog";
|
||||
export const EVENTS_PATH = "src/data/events";
|
||||
export const WORKSHOPS_PATH = "src/data/workshops";
|
||||
export const NEWS_PATH = "src/data/news";
|
||||
export const TECHNICAL_PATH = "src/data/technical";
|
||||
|
||||
const blog = defineCollection({
|
||||
loader: glob({ pattern: "**/[^_]*.md", base: `./${BLOG_PATH}` }),
|
||||
@@ -23,4 +27,90 @@ const blog = defineCollection({
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = { blog };
|
||||
const events = defineCollection({
|
||||
loader: glob({ pattern: "**/[^_]*.md", base: `./${EVENTS_PATH}` }),
|
||||
schema: ({ image }) =>
|
||||
z.object({
|
||||
author: z.string().default(SITE.author),
|
||||
pubDatetime: z.date(),
|
||||
eventDate: z.date(),
|
||||
eventEndDate: z.date().optional(),
|
||||
location: z.string().optional(),
|
||||
modDatetime: z.date().optional().nullable(),
|
||||
title: z.string(),
|
||||
featured: z.boolean().optional(),
|
||||
draft: z.boolean().optional(),
|
||||
tags: z.array(z.string()).default(["event"]),
|
||||
ogImage: image().or(z.string()).optional(),
|
||||
description: z.string(),
|
||||
canonicalURL: z.string().optional(),
|
||||
hideEditPost: z.boolean().optional(),
|
||||
timezone: z.string().optional(),
|
||||
registrationLink: z.string().optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
const workshops = defineCollection({
|
||||
loader: glob({ pattern: "**/[^_]*.md", base: `./${WORKSHOPS_PATH}` }),
|
||||
schema: ({ image }) =>
|
||||
z.object({
|
||||
author: z.string().default(SITE.author),
|
||||
pubDatetime: z.date(),
|
||||
workshopDate: z.date(),
|
||||
duration: z.string().optional(),
|
||||
level: z.enum(["beginner", "intermediate", "advanced"]).optional(),
|
||||
modDatetime: z.date().optional().nullable(),
|
||||
title: z.string(),
|
||||
featured: z.boolean().optional(),
|
||||
draft: z.boolean().optional(),
|
||||
tags: z.array(z.string()).default(["workshop"]),
|
||||
ogImage: image().or(z.string()).optional(),
|
||||
description: z.string(),
|
||||
canonicalURL: z.string().optional(),
|
||||
hideEditPost: z.boolean().optional(),
|
||||
timezone: z.string().optional(),
|
||||
materials: z.string().optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
const news = defineCollection({
|
||||
loader: glob({ pattern: "**/[^_]*.md", base: `./${NEWS_PATH}` }),
|
||||
schema: ({ image }) =>
|
||||
z.object({
|
||||
author: z.string().default(SITE.author),
|
||||
pubDatetime: z.date(),
|
||||
modDatetime: z.date().optional().nullable(),
|
||||
title: z.string(),
|
||||
featured: z.boolean().optional(),
|
||||
draft: z.boolean().optional(),
|
||||
tags: z.array(z.string()).default(["news"]),
|
||||
ogImage: image().or(z.string()).optional(),
|
||||
description: z.string(),
|
||||
canonicalURL: z.string().optional(),
|
||||
hideEditPost: z.boolean().optional(),
|
||||
timezone: z.string().optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
const technical = defineCollection({
|
||||
loader: glob({ pattern: "**/[^_]*.md", base: `./${TECHNICAL_PATH}` }),
|
||||
schema: ({ image }) =>
|
||||
z.object({
|
||||
author: z.string().default(SITE.author),
|
||||
pubDatetime: z.date(),
|
||||
modDatetime: z.date().optional().nullable(),
|
||||
title: z.string(),
|
||||
featured: z.boolean().optional(),
|
||||
draft: z.boolean().optional(),
|
||||
tags: z.array(z.string()).default(["technical"]),
|
||||
ogImage: image().or(z.string()).optional(),
|
||||
description: z.string(),
|
||||
canonicalURL: z.string().optional(),
|
||||
hideEditPost: z.boolean().optional(),
|
||||
timezone: z.string().optional(),
|
||||
difficulty: z.enum(["beginner", "intermediate", "advanced"]).optional(),
|
||||
readingTime: z.string().optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = { blog, events, workshops, news, technical };
|
||||
|
||||
Reference in New Issue
Block a user