Add MDX support

Start writing a blog and clean up/hide tester stuff
This commit is contained in:
Michał Gdula 2024-05-28 21:36:29 +01:00
parent 18729faff4
commit 54e79beb30
18 changed files with 870 additions and 43 deletions

View 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;
}
```

View file

@ -1,4 +1,5 @@
---
draft: true
title: "Code Examples"
description: "Aurghhhhhh"
pubDate: 2022-07-08

View file

@ -1,4 +1,5 @@
---
draft: true
title: "Image Examples"
description: "fug"
pubDate: 2024-07-08

View file

@ -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

View file

@ -1,4 +1,5 @@
---
draft: true
title: "Math Examples"
description: "REEEEEE"
pubDate: 2024-06-08

View file

@ -0,0 +1,3 @@
---
name: Astro
---

View file

@ -1,3 +0,0 @@
---
name: Code
---

View file

@ -1,3 +0,0 @@
---
name: Fortnite
---

View file

@ -1,5 +0,0 @@
---
name: "Math"
---
``

View file

@ -0,0 +1,3 @@
---
name: Typescript
---