diff --git a/src/pages/posts/jekyll-github-pages-and-azabani.md b/src/content/blog/jekyll-github-pages-and-azabani.md similarity index 95% rename from src/pages/posts/jekyll-github-pages-and-azabani.md rename to src/content/blog/jekyll-github-pages-and-azabani.md index d7bb62b..fa79cca 100644 --- a/src/pages/posts/jekyll-github-pages-and-azabani.md +++ b/src/content/blog/jekyll-github-pages-and-azabani.md @@ -9,7 +9,7 @@ description: "This is my first time trying to create a proper blog, and my secon This is my first time trying to create a proper blog, and my second time using GitHub pages, [the first][github-pages-resume] less than 2 weeks earlier. As a cheap high school student with zero income and expensive subscriptions, it's obvious that I wouldn't try to brunt -the cost of any sort of subscription for a site I barely use - well, not anymore, at least. +the cost of any sort of subscription for a site I barely use - well, not anymore, at least. Jekyll is pretty cool - I'm really having fun learning new web tech (like Vue, BrowserSync, Sass). The syntax of the header is something new, but the templating language's filters are something I'm already familiar with, using Jinja with Flask and Django already (great, a third dialect of both similar and completely different filters to get used to!). diff --git a/src/pages/posts/painting-images-with-ipv6.md b/src/content/blog/painting-images-with-ipv6.md similarity index 99% rename from src/pages/posts/painting-images-with-ipv6.md rename to src/content/blog/painting-images-with-ipv6.md index c924baf..44abacc 100644 --- a/src/pages/posts/painting-images-with-ipv6.md +++ b/src/content/blog/painting-images-with-ipv6.md @@ -1,7 +1,7 @@ --- layout: "@layouts/Post.astro" title: "Painting Images with IPv6" -date: 2023-04-14 13:07:43 -0500 +pubDate: 2023-04-14 13:07:43 -0500 tags: ["ipv6", "python", "asyncio", "websocket", "PIL"] description: "Have you ever painted images with IPv6? I found out how in 30 minutes." --- diff --git a/src/pages/posts/project-facelift-new-and-old.md b/src/content/blog/project-facelift-new-and-old.md similarity index 99% rename from src/pages/posts/project-facelift-new-and-old.md rename to src/content/blog/project-facelift-new-and-old.md index 0dda3cb..a9c055a 100644 --- a/src/pages/posts/project-facelift-new-and-old.md +++ b/src/content/blog/project-facelift-new-and-old.md @@ -1,7 +1,7 @@ --- title: "Project Facelift, New and Old" layout: "@layouts/Post.astro" -date: 2021-02-25 16:41:41 -0600 +pubDate: 2021-02-25 16:41:41 -0600 tags: ["projects", "photography", "update"] preview_image: "https://raw.githubusercontent.com/Xevion/Paths/master/.media/banner.png" description: "Through December, I decided to make heavy visual changes to many of my biggest projects, creating custom banners, of which I am quite proud..." diff --git a/src/pages/posts/race-conditions-in-signal-handlers.md b/src/content/blog/race-conditions-in-signal-handlers.md similarity index 100% rename from src/pages/posts/race-conditions-in-signal-handlers.md rename to src/content/blog/race-conditions-in-signal-handlers.md diff --git a/src/pages/posts/restricted-memory-and-data-framing-tricks.md b/src/content/blog/restricted-memory-and-data-framing-tricks.md similarity index 99% rename from src/pages/posts/restricted-memory-and-data-framing-tricks.md rename to src/content/blog/restricted-memory-and-data-framing-tricks.md index 95a4999..a332ccb 100644 --- a/src/pages/posts/restricted-memory-and-data-framing-tricks.md +++ b/src/content/blog/restricted-memory-and-data-framing-tricks.md @@ -1,7 +1,7 @@ --- title: "Restricted Memory & Data Framing Tricks" layout: "@layouts/Post.astro" -date: 2022-07-16 13:51:00 -0500 +pubDate: 2022-07-16 13:51:00 -0500 tags: ["c", "memory", "embedded", "ti", "msp430", "union"] description: "Tips and tricks I learned about handling restricted memory while working on microcontrollers at my first internship" --- diff --git a/src/pages/posts/runnerspace-built-in-under-30-hours.md b/src/content/blog/runnerspace-built-in-under-30-hours.md similarity index 99% rename from src/pages/posts/runnerspace-built-in-under-30-hours.md rename to src/content/blog/runnerspace-built-in-under-30-hours.md index 10c213d..d1e2425 100644 --- a/src/pages/posts/runnerspace-built-in-under-30-hours.md +++ b/src/content/blog/runnerspace-built-in-under-30-hours.md @@ -1,7 +1,7 @@ --- layout: "@layouts/Post.astro" title: "Runnerspace, Built in Under 30 Hours" -date: 2022-03-29 13:56:22 -0600 +pubDate: 2022-03-29 13:56:22 -0600 tags: ["flask", "hackathon", "utsa", "rowdyhacks", "projects"] preview_image: https://raw.githubusercontent.com/Xevion/runnerspace/master/static/embed-banner.png description: "I attended Rowdy Hacks 2022 at UTSA, and while I can't say I left smiling, I did create a pretty cool project that I'd like to talk about." diff --git a/src/content/config.ts b/src/content/config.ts new file mode 100644 index 0000000..691e49a --- /dev/null +++ b/src/content/config.ts @@ -0,0 +1,16 @@ +import { z, defineCollection } from 'astro:content'; + +const blogCollection = defineCollection({ + type: 'content', // v2.5.0 and later + schema: z.object({ + title: z.string(), + description: z.string(), + pubDate: z.string(), + tags: z.array(z.string()), + preview_image: z.string().optional(), + }), +}); + +export const collections = { + 'blog': blogCollection, +}; \ No newline at end of file diff --git a/src/env.d.ts b/src/env.d.ts index f964fe0..acef35f 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1 +1,2 @@ +/// /// diff --git a/src/pages/index.astro b/src/pages/index.astro index e02bbbc..3e62287 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,21 +1,19 @@ --- +import { getCollection, getEntry } from "astro:content"; import Base from "@layouts/Base.astro"; import Summary from "@components/Summary.astro"; -const posts = await Astro.glob("/src/pages/posts/*.md"); -interface Props { - pubDate: Date; -} +const posts = await getCollection("blog"); --- { posts.map((post) => ( )) }