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