2023-04-26 10:33:30 +02:00
|
|
|
---
|
|
|
|
import List from "../../layouts/List.astro";
|
|
|
|
import { getCollection } from 'astro:content';
|
|
|
|
|
|
|
|
const posts = (await getCollection('songs'))
|
|
|
|
.sort((a, b) => a.data.date < b.data.date ? 1 : -1)
|
|
|
|
.map(entry => ({
|
|
|
|
title: entry.data.title,
|
|
|
|
slug: `/songs/${entry.slug}/`,
|
|
|
|
}))
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2023-04-26 10:39:36 +02:00
|
|
|
<List title="Songs" pages={posts} />
|