From 14128477aade2263cdb671a91a32e927c2f50ad4 Mon Sep 17 00:00:00 2001 From: Tymon Date: Wed, 22 Feb 2023 23:09:59 +0100 Subject: [PATCH] more cleanup + add .prettierignore --- .prettierignore | 1 + src/components/blogList.astro | 31 ------------------------------- src/pages/blog/index.astro | 31 +++++++++++++++++++++++++++++-- src/pages/fanfic/index.astro | 3 ++- 4 files changed, 32 insertions(+), 34 deletions(-) create mode 100644 .prettierignore delete mode 100644 src/components/blogList.astro diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..7773828 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +dist/ \ No newline at end of file diff --git a/src/components/blogList.astro b/src/components/blogList.astro deleted file mode 100644 index 82f006c..0000000 --- a/src/components/blogList.astro +++ /dev/null @@ -1,31 +0,0 @@ ---- -import { getCollection } from "astro:content"; - -const posts = (await getCollection("blog")) - .filter( - (entry) => !entry.data.wip || process.env.NODE_ENV === "development" - ) - .sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()); ---- - -
- { - posts.map((post) => { - return ( - -
-
- {post.data.title} -{" "} - {post.data.pubDate.toDateString()} -
-
- {post.data.description} -
-
- ); - }) - } -
diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index e606130..dee8521 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -1,9 +1,36 @@ --- import Base from "../../layout/Base.astro"; -import BlogList from "../../components/blogList.astro"; + +import { getCollection } from "astro:content"; + +const posts = (await getCollection("blog")) + .filter( + (entry) => !entry.data.wip || process.env.NODE_ENV === "development" + ) + .sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()); ---

Blog

- +
+ { + posts.map((post) => { + return ( + +
+
+ {post.data.title} -{" "} + {post.data.pubDate.toDateString()} +
+
+ {post.data.description} +
+
+ ); + }) + } +
diff --git a/src/pages/fanfic/index.astro b/src/pages/fanfic/index.astro index adf1299..8625c54 100644 --- a/src/pages/fanfic/index.astro +++ b/src/pages/fanfic/index.astro @@ -1,7 +1,8 @@ --- +import Base from "../../layout/Base.astro"; + import { getCollection } from "astro:content"; -import Base from "../../layout/Base.astro"; const fics = (await getCollection("fanfic")) .filter( (entry) =>