mirror of
https://github.com/github/awesome-copilot.git
synced 2026-04-12 11:15:56 +00:00
feat: migrate learning-hub articles into Astro website
- Add Astro Content Collection for learning-hub articles - Move 5 fundamentals articles into website/src/content/learning-hub/ - Create ArticleLayout.astro for rendering markdown articles - Create index page listing all articles in recommended reading order - Create dynamic [slug].astro route for individual articles - Add Learning Hub to main navigation and homepage cards - Add article prose and index page CSS styles - Update internal links to use website URLs
This commit is contained in:
20
website/src/content.config.ts
Normal file
20
website/src/content.config.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { defineCollection, z } from "astro:content";
|
||||
import { glob } from "astro/loaders";
|
||||
|
||||
const learningHub = defineCollection({
|
||||
loader: glob({ pattern: "**/*.md", base: "./src/content/learning-hub" }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
authors: z.array(z.string()).optional(),
|
||||
lastUpdated: z.string().optional(),
|
||||
estimatedReadingTime: z.string().optional(),
|
||||
tags: z.array(z.string()).optional(),
|
||||
relatedArticles: z.array(z.string()).optional(),
|
||||
prerequisites: z.array(z.string()).optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = {
|
||||
"learning-hub": learningHub,
|
||||
};
|
||||
Reference in New Issue
Block a user