continued working on docs

This commit is contained in:
2024-02-01 19:22:05 +01:00
parent a77cbf4a49
commit fb3a7c48fd
8 changed files with 189 additions and 9 deletions

View File

@@ -1,10 +1,11 @@
---
import { date } from "astro/zod";
import Layout from "../layouts/Layout.astro";
const allDocs = await Astro.glob("./docs/*.mdx");
const fileteredDocs = allDocs.sort(
(a, b) => +new Date(b.frontmatter.date) - +new Date(a.frontmatter.date),
);
const unsortedDocs = await Astro.glob("./docs/*/*.md");
const docs = unsortedDocs
.sort(
(a, b) => +new Date(b.frontmatter.date) - +new Date(a.frontmatter.date),
)
.filter((doc) => !doc.frontmatter.draft);
---
<Layout