-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): mirror config from blog
- Loading branch information
Showing
2 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
# Content | ||
|
||
Here contains all the content and data for LR Tech Blog. It uses the Astro's Content Collection feature to manage them. | ||
The content is written in MDX and the data is written in JSON. | ||
|
||
## Raise an Issue | ||
|
||
For now we not accepting any PRs, but you can raise an issue if you found any error or want to suggest something. | ||
|
||
## Discussions | ||
|
||
If you have any question or want to discuss something about the content or just share some ideas, you can start a discussion. | ||
|
||
[![Discuss on GitHub](https://img.shields.io/badge/Discussions-GitHub-333333?logo=github)](https://github.com/LR-Tech-Blog/content/discussions) | ||
[![Discuss on GitHub](https://img.shields.io/badge/Discussions-GitHub-333333?logo=github)](https://github.com/LR-Tech-Blog/content/discussions) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { z, defineCollection, reference } from "astro:content"; | ||
|
||
const blogCollection = defineCollection({ | ||
type: "content", | ||
schema: z.object({ | ||
id: z.string(), | ||
title: z.string(), | ||
author: reference("authors"), | ||
date: z.date(), | ||
draft: z.boolean(), | ||
tags: z.array(z.string()), | ||
postType: z.string(), | ||
description: z.string(), | ||
image: z.object({ | ||
src: z.string(), | ||
alt: z.string() | ||
}) | ||
}) | ||
}) | ||
|
||
const authorProfile = defineCollection({ | ||
type: "data", | ||
schema: z.object({ | ||
name: z.string(), | ||
age: z.number(), | ||
email: z.string(), | ||
linkedin: z.string().url(), | ||
github: z.string().url(), | ||
profileImageUrl: z.string().url().nullable(), | ||
profileImageAlt: z.string().nullable(), | ||
profileImageType: z.enum(["URL", "Gravatar"]), | ||
stack: z.array(z.object({ | ||
name: z.string(), | ||
iconName: z.string(), | ||
iconColor: z.string(), | ||
})), | ||
}) | ||
}) | ||
|
||
const authorDescription = defineCollection({ | ||
type: "content", | ||
schema: z.object({ | ||
author: reference("authors") | ||
}) | ||
}) | ||
|
||
export const collections = { | ||
'posts': blogCollection, | ||
'authors': authorProfile, | ||
'authorsDescription': authorDescription | ||
} |