diff --git a/src/pages/micro/index.astro b/src/pages/micro/index.astro index 1a830f7..781732a 100644 --- a/src/pages/micro/index.astro +++ b/src/pages/micro/index.astro @@ -1,20 +1,106 @@ --- import { getCollection } from "astro:content" +import { format } from "date-fns" import MainContainer from "../../components/MainContainer.astro" -import Micro from "../../components/Micro.astro" import BaseLayout from "../../layouts/BaseLayout.astro" const allMicro = await getCollection("micro") -const sortedMicro = allMicro.sort( - (a, b) => b.data.date.valueOf() - a.data.date.valueOf(), -) -const pageTitle = "Micro Notes" +const sortedMicro = allMicro + .filter((micro) => micro.data.published !== false) + .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()) + +const pageTitle = "Micro" --- -
- {sortedMicro.map((micro) => )} +
+ {/* Header Section */} +
+

Micro

+

+ Quick thoughts, updates, and shorter musings. Like tweets, but on my + own site. +

+ + +
+ + {/* Micro Posts */} +
+ { + sortedMicro.map(async (micro) => { + const { Content } = await micro.render() + return ( +
+
+
+ + + + + + +
+ + {micro.data.title && ( +

+ {micro.data.title} +

+ )} + +
+ +
+
+
+ ) + }) + } +
+ +