From b0fec9d3208414f9869bb293234b6e0bdccd14a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Mon, 1 Apr 2024 13:52:31 +0200 Subject: [PATCH] fix: remove projects & draft --- src/pages/ctfs/index.astro | 1 - src/pages/projects/[...slug].astro | 67 ------------------------------ src/pages/projects/index.astro | 30 ------------- 3 files changed, 98 deletions(-) delete mode 100644 src/pages/projects/[...slug].astro delete mode 100644 src/pages/projects/index.astro diff --git a/src/pages/ctfs/index.astro b/src/pages/ctfs/index.astro index d4689af..309f8e7 100644 --- a/src/pages/ctfs/index.astro +++ b/src/pages/ctfs/index.astro @@ -6,7 +6,6 @@ import ArrowCard from "@components/ArrowCard.astro"; import { CTFS } from "@consts"; const data = (await getCollection("ctfs")) - .filter(ctf => !ctf.data.draft) .sort((a, b) => b.data.dateStart.valueOf() - a.data.dateStart.valueOf()); type Acc = { diff --git a/src/pages/projects/[...slug].astro b/src/pages/projects/[...slug].astro deleted file mode 100644 index 4160dfd..0000000 --- a/src/pages/projects/[...slug].astro +++ /dev/null @@ -1,67 +0,0 @@ ---- -import { type CollectionEntry, getCollection } from "astro:content"; -import PageLayout from "@layouts/PageLayout.astro"; -import Container from "@components/Container.astro"; -import FormattedDate from "@components/FormattedDate.astro"; -import { readingTime } from "@lib/utils"; -import BackToPrev from "@components/BackToPrev.astro"; -import Link from "@components/Link.astro"; - -export async function getStaticPaths() { - const projects = (await getCollection("projects")) - .filter(post => !post.data.draft) - .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()); - return projects.map((project) => ({ - params: { slug: project.slug }, - props: project, - })); -} -type Props = CollectionEntry<"projects">; - -const project = Astro.props; -const { Content } = await project.render(); ---- - - - -
- - Back to projects - -
-
-
-
- -
- • -
- {readingTime(project.body)} -
-
-
- {project.data.title} -
- {(project.data.demoURL || project.data.repoURL) && ( - - )} -
-
- -
-
-
\ No newline at end of file diff --git a/src/pages/projects/index.astro b/src/pages/projects/index.astro deleted file mode 100644 index 9a5c037..0000000 --- a/src/pages/projects/index.astro +++ /dev/null @@ -1,30 +0,0 @@ ---- -import { getCollection } from "astro:content"; -import PageLayout from "@layouts/PageLayout.astro"; -import Container from "@components/Container.astro"; -import ArrowCard from "@components/ArrowCard.astro"; -import { PROJECTS } from "@consts"; - -const projects = (await getCollection("projects")) - .filter(project => !project.data.draft) - .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()); ---- - - - -
-
- Projects -
-
    - { - projects.map((project) => ( -
  • - -
  • - )) - } -
-
-
-