First release.

This commit is contained in:
2024-06-08 23:05:48 +08:00
commit f04ca4a96b
31 changed files with 7699 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
---
import type { CollectionEntry, CollectionKey } from "astro:content";
interface Props {
collectionName: CollectionKey;
categoryName: string;
posts: Array<CollectionEntry<CollectionKey>>;
}
const { collectionName, categoryName, posts } = Astro.props;
---
<h1>{categoryName}</h1>
<ul>
{
posts.map((post) => (
<li>
<a href={`/article/${collectionName}/${post.slug}`} target="_blank">
{post.data.title}
</a>
</li>
))
}
</ul>
<style>
ul {
padding: 0;
list-style-type: none;
}
h1 {
margin: 0.5em 0 0 0;
}
</style>