diff --git a/src/components/PostList.astro b/src/components/PostList.astro index 1e838a7..33ce2eb 100644 --- a/src/components/PostList.astro +++ b/src/components/PostList.astro @@ -2,6 +2,7 @@ import { getCollection, type CollectionEntry } from "astro:content"; import Timestamp from "./Timestamp.astro"; import { sortBy } from "lodash-es"; +import TagList from "./TagList.astro"; interface Props { basePath: string; @@ -43,18 +44,22 @@ const sortedPosts = sortBy(allPosts, (post) => -post.data.date); { sortedPosts.map((post) => { return ( - - - - - - - - {post.data.title} - - - - + <> + + + + + + + + + + + ); }) } @@ -63,14 +68,14 @@ const sortedPosts = sortBy(allPosts, (post) => -post.data.date); diff --git a/src/components/TagList.astro b/src/components/TagList.astro new file mode 100644 index 0000000..2702f48 --- /dev/null +++ b/src/components/TagList.astro @@ -0,0 +1,18 @@ +--- +import "../styles/tagList.scss"; + +const { extraFront, tags, extraBack } = Astro.props; +--- + +
+ {extraFront} + { + tags.toSorted().map((tag) => ( + +