mirror of
https://github.com/Fluffy-Bean/website.git
synced 2025-05-29 14:53:16 +00:00
Tags and Filtering
Yeet projects, as they're identical to posts in every way but name Add OpenGraph for SEO Add Plugin prop to Layout to avoid loading unnecessary JS and CSS
This commit is contained in:
parent
745ac58045
commit
291552c340
21 changed files with 336 additions and 212 deletions
|
@ -1,28 +1,17 @@
|
|||
import { z, defineCollection } from "astro:content";
|
||||
import { z, defineCollection, reference } from "astro:content";
|
||||
|
||||
const postsCollection = defineCollection({
|
||||
const posts = defineCollection({
|
||||
type: "content",
|
||||
schema: z.object({
|
||||
draft: z.boolean().optional().default(false),
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
pubDate: z.string().transform((str) => new Date(str)),
|
||||
tags: z.array(z.string()),
|
||||
tags: z.array(reference("tags")),
|
||||
}),
|
||||
});
|
||||
|
||||
const projectsCollection = defineCollection({
|
||||
type: "content",
|
||||
schema: z.object({
|
||||
draft: z.boolean().optional().default(false),
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
pubDate: z.string().transform((str) => new Date(str)),
|
||||
tags: z.array(z.string()),
|
||||
}),
|
||||
});
|
||||
|
||||
const certificatesCollection = defineCollection({
|
||||
const certificates = defineCollection({
|
||||
type: "data",
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
|
@ -33,8 +22,15 @@ const certificatesCollection = defineCollection({
|
|||
}),
|
||||
});
|
||||
|
||||
const tags = defineCollection({
|
||||
type: "content",
|
||||
schema: z.object({
|
||||
name: z.string(),
|
||||
})
|
||||
})
|
||||
|
||||
export const collections = {
|
||||
posts: postsCollection,
|
||||
projects: projectsCollection,
|
||||
certificates: certificatesCollection,
|
||||
posts,
|
||||
certificates,
|
||||
tags,
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@ title: "Code Examples"
|
|||
description: "Aurghhhhhh"
|
||||
pubDate: 2022-07-08
|
||||
tags:
|
||||
- "Gaybo"
|
||||
- "code"
|
||||
---
|
||||
|
||||
```astro
|
||||
|
|
|
@ -3,7 +3,7 @@ title: "Image Examples"
|
|||
description: "fug"
|
||||
pubDate: 2024-07-08
|
||||
tags:
|
||||
- "Faggo"
|
||||
- "code"
|
||||
---
|
||||
|
||||

|
||||
|
|
|
@ -3,7 +3,8 @@ title: This is an example Post
|
|||
description: "Cheat Sheet for Markdown"
|
||||
pubDate: 2022-07-08
|
||||
tags:
|
||||
- "Faggor"
|
||||
- "code"
|
||||
- "fortnite"
|
||||
---
|
||||
|
||||
# Markdown Cheat Sheet
|
||||
|
|
|
@ -3,7 +3,8 @@ title: "Math Examples"
|
|||
description: "REEEEEE"
|
||||
pubDate: 2024-06-08
|
||||
tags:
|
||||
- "Gaybo"
|
||||
- "code"
|
||||
- "math"
|
||||
---
|
||||
|
||||
Some simple mathematical expressions:
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
title: GwaGwa
|
||||
description: This is a very very very very very very very very very very very very long description of a post
|
||||
tags:
|
||||
- "GwaGwa"
|
||||
- "Gaming"
|
||||
- "Urchin"
|
||||
- "Fortnite"
|
||||
---
|
||||
|
||||
Im actually going to blow up
|
||||
|
||||
I FUCKING HATE JAVASCRIPT
|
3
src/content/tags/code.md
Normal file
3
src/content/tags/code.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
name: Code
|
||||
---
|
3
src/content/tags/fortnite.md
Normal file
3
src/content/tags/fortnite.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
name: Fortnite
|
||||
---
|
4
src/content/tags/math.md
Normal file
4
src/content/tags/math.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: "Math"
|
||||
---
|
||||
``
|
Loading…
Add table
Add a link
Reference in a new issue