mirror of
https://github.com/Xevion/undefined.behavio.rs.git
synced 2025-12-11 10:09:10 -06:00
Setup blog content collection, move all posts, use pubDate
This commit is contained in:
@@ -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.
|
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
|
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 <span style="white-space: nowrap;">barely use - well</span>, not anymore, at least.
|
the cost of any sort of subscription for a site I <span class="nowrap">barely use - well</span>, 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,
|
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!).
|
using Jinja with Flask and Django already (great, a third dialect of both similar and completely different filters to get used to!).
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
layout: "@layouts/Post.astro"
|
layout: "@layouts/Post.astro"
|
||||||
title: "Painting Images with IPv6"
|
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"]
|
tags: ["ipv6", "python", "asyncio", "websocket", "PIL"]
|
||||||
description: "Have you ever painted images with IPv6? I found out how in 30 minutes."
|
description: "Have you ever painted images with IPv6? I found out how in 30 minutes."
|
||||||
---
|
---
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: "Project Facelift, New and Old"
|
title: "Project Facelift, New and Old"
|
||||||
layout: "@layouts/Post.astro"
|
layout: "@layouts/Post.astro"
|
||||||
date: 2021-02-25 16:41:41 -0600
|
pubDate: 2021-02-25 16:41:41 -0600
|
||||||
tags: ["projects", "photography", "update"]
|
tags: ["projects", "photography", "update"]
|
||||||
preview_image: "https://raw.githubusercontent.com/Xevion/Paths/master/.media/banner.png"
|
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..."
|
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..."
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: "Restricted Memory & Data Framing Tricks"
|
title: "Restricted Memory & Data Framing Tricks"
|
||||||
layout: "@layouts/Post.astro"
|
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"]
|
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"
|
description: "Tips and tricks I learned about handling restricted memory while working on microcontrollers at my first internship"
|
||||||
---
|
---
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
layout: "@layouts/Post.astro"
|
layout: "@layouts/Post.astro"
|
||||||
title: "Runnerspace, Built in Under 30 Hours"
|
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"]
|
tags: ["flask", "hackathon", "utsa", "rowdyhacks", "projects"]
|
||||||
preview_image: https://raw.githubusercontent.com/Xevion/runnerspace/master/static/embed-banner.png
|
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."
|
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."
|
||||||
16
src/content/config.ts
Normal file
16
src/content/config.ts
Normal file
@@ -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,
|
||||||
|
};
|
||||||
1
src/env.d.ts
vendored
1
src/env.d.ts
vendored
@@ -1 +1,2 @@
|
|||||||
|
/// <reference path="../.astro/types.d.ts" />
|
||||||
/// <reference types="astro/client" />
|
/// <reference types="astro/client" />
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
---
|
---
|
||||||
|
import { getCollection, getEntry } from "astro:content";
|
||||||
import Base from "@layouts/Base.astro";
|
import Base from "@layouts/Base.astro";
|
||||||
import Summary from "@components/Summary.astro";
|
import Summary from "@components/Summary.astro";
|
||||||
const posts = await Astro.glob("/src/pages/posts/*.md");
|
const posts = await getCollection("blog");
|
||||||
interface Props {
|
|
||||||
pubDate: Date;
|
|
||||||
}
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<Base>
|
<Base>
|
||||||
{
|
{
|
||||||
posts.map((post) => (
|
posts.map((post) => (
|
||||||
<Summary
|
<Summary
|
||||||
url={post.url || "unknown"}
|
url={post.slug}
|
||||||
description={post.frontmatter.description}
|
description={post.data.description}
|
||||||
date={new Date()}
|
date={new Date()}
|
||||||
title={post.frontmatter.title}
|
title={post.data.title}
|
||||||
tags={post.frontmatter.tags}
|
tags={post.data.tags}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user