--- import { Image } from "astro:assets"; import { getCollection } from "astro:content"; import dayjs from "dayjs"; import utc from "dayjs/plugin/utc"; import Layout from "./Layout.astro"; import Navbar from "@/components/Navbar.astro"; import moods from "@/utils/moods"; import outerBBS from "@/assets/guild-bbs.png"; import innerBBS from "@/assets/guild-bbs-content.png"; import sideBBS from "@/assets/guild-bbs-list.png"; interface Props { title: string; date: Date; currently?: { mood?: string; reading?: string; listening?: string; watching?: string; playing?: string; } } const { title, date, currently } = Astro.props; const blog = await getCollection("blog"); blog.length = Math.min(blog.length, 5); blog.sort((a, b) => a.data.pubDate!.valueOf() - b.data.pubDate!.valueOf()); dayjs.extend(utc); --- recent posts {blog.map(entry => ( {entry.data.title} {dayjs(entry.data.pubDate).utc(true).format("M/D/YY")} ))} other links archive rss feed {title} Date {dayjs(date).utc(true).format("MMMM DD, YYYY")} {currently && ( )}