diff --git a/src/categories.js b/src/categories.js index fcbf3eb..030548b 100644 --- a/src/categories.js +++ b/src/categories.js @@ -1,7 +1,23 @@ export default Object.entries({ - all: { title: "All", default: true }, - linux: { title: "Linux" }, - web: { title: "Web Development" }, - bot: { title: "Discord Bot Development" }, - other: { title: "Other" } + all: { + title: "All", + default: true, + description: + "Hello, and welcome to my blog. I post about Discord Bot Development, Web Development, Linux, and other Tech-related subjects. You can filter and search in the sidebar." + }, + linux: { + title: "Linux", + description: + "Linux is an operating system that has existed since the 1990s, and is used extensively, from Android in your phones which is linux-based to the over 40% of websites running on linux." + }, + web: { title: "Web Development", description: "Web Development" }, + bot: { + title: "Discord Bot Development", + description: "Discord Bot Development" + }, + other: { + title: "Other", + description: + "This section of my blog is for all my articles that don't fit into any other catagories." + } }) diff --git a/src/pages/blog/[...category]/index.astro b/src/pages/blog/[...category]/index.astro index b83fe0d..03c6abc 100644 --- a/src/pages/blog/[...category]/index.astro +++ b/src/pages/blog/[...category]/index.astro @@ -2,9 +2,11 @@ import Layout from "../../../layouts/Layout.astro" import BlogPost from "../../../components/BlogPost.astro" import styles from "../../../styles/Blog.module.css" -import { getCollection } from "astro:content" +import { CollectionEntry, getCollection } from "astro:content" +import { micromark } from "micromark" import categories from "../../../categories" import Divider from "../../../components/Divider.astro" +type Post = CollectionEntry<"blog"> export const getStaticPaths = async () => { const posts = await getCollection("blog") @@ -14,13 +16,14 @@ export const getStaticPaths = async () => { props: { filteredPosts: properties.default ? posts - : posts.filter((post) => post.data.category == category) + : posts.filter((post) => post.data.category == category), + categoryProperties: properties } })) } const { category } = Astro.params -const { filteredPosts } = Astro.props +const { filteredPosts, categoryProperties } = Astro.props --- @@ -51,13 +54,13 @@ const { filteredPosts } = Astro.props

Welcome to the blog!

- Hello, and welcome to my blog. I post about Discord Bot - Development, Web Development, Linux, and other Tech-related - subjects. You can filter and search in the sidebar. +

{ - filteredPosts.map((post) => ( + filteredPosts.map((post: Post) => (