22 lines
457 B
Plaintext
22 lines
457 B
Plaintext
---
|
|
import { getCollection } from "astro:content";
|
|
|
|
const { sectionName } = Astro.props;
|
|
|
|
const entries = (await getCollection(sectionName)).sort((a, b) =>
|
|
a.data.title.localeCompare(b.data.title),
|
|
);
|
|
|
|
const articles = entries.filter((entry) => entry.id !== "index");
|
|
---
|
|
|
|
<ul>
|
|
{articles.map((entry) => (
|
|
<li>
|
|
<a href={`/${sectionName}/${entry.id}`}>
|
|
{entry.data.title}
|
|
</a>
|
|
</li>
|
|
))}
|
|
</ul>
|