mirror of
https://github.com/Fluffy-Bean/website.git
synced 2025-05-29 14:53:16 +00:00
Add MDX support
Start writing a blog and clean up/hide tester stuff
This commit is contained in:
parent
18729faff4
commit
54e79beb30
18 changed files with 870 additions and 43 deletions
34
src/content/posts/2024_05_28-Astro_is_hard.mdx
Normal file
34
src/content/posts/2024_05_28-Astro_is_hard.mdx
Normal file
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
title: Astro is hard....
|
||||
description: Arugh
|
||||
pubDate: 2024-05-28
|
||||
tags:
|
||||
- astro
|
||||
- typescript
|
||||
---
|
||||
|
||||
import Note from "../../components/Note.astro";
|
||||
|
||||
<Note text="I have no clue what I'm doing :3" />
|
||||
|
||||
- I've been trying to learn typescript through trying astro
|
||||
- Astro is hard, due to all the issues I've encountered
|
||||
|
||||
```typescript
|
||||
export async function getTagsBySlug(postTags: string[]): Promise<CollectionEntry<"tags">[]> {
|
||||
// Collect all the tags from collections
|
||||
const allTags: CollectionEntry<"tags">[] = await getCollection("tags");
|
||||
|
||||
// Loop through all the tags in a post and the tags in the collections
|
||||
// To see if they match, if they do we'll return them
|
||||
const tags: CollectionEntry<"tags">[] = [];
|
||||
postTags.forEach((postTag) => {
|
||||
allTags.forEach((allTag) => {
|
||||
if (allTag.slug === postTag) tags.push(allTag);
|
||||
});
|
||||
});
|
||||
|
||||
// Yeet
|
||||
return tags;
|
||||
}
|
||||
```
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
draft: true
|
||||
title: "Code Examples"
|
||||
description: "Aurghhhhhh"
|
||||
pubDate: 2022-07-08
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
draft: true
|
||||
title: "Image Examples"
|
||||
description: "fug"
|
||||
pubDate: 2024-07-08
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
draft: true
|
||||
title: This is an example Post
|
||||
description: "Cheat Sheet for Markdown"
|
||||
pubDate: 2022-07-08
|
||||
tags:
|
||||
- "code"
|
||||
- "fortnite"
|
||||
---
|
||||
|
||||
# Markdown Cheat Sheet
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
draft: true
|
||||
title: "Math Examples"
|
||||
description: "REEEEEE"
|
||||
pubDate: 2024-06-08
|
3
src/content/tags/astro.md
Normal file
3
src/content/tags/astro.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
name: Astro
|
||||
---
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
name: Code
|
||||
---
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
name: Fortnite
|
||||
---
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
name: "Math"
|
||||
---
|
||||
|
||||
``
|
3
src/content/tags/typescript.md
Normal file
3
src/content/tags/typescript.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
name: Typescript
|
||||
---
|
Loading…
Add table
Add a link
Reference in a new issue