Cyril Šebek d9e7b62e14
Middleware modifications
- Removed custom middleware (wasn't working with nodejs adapter)
- Update settings for i18n adapter
2024-07-08 23:50:02 +02:00

36 lines
1.1 KiB
Plaintext

---
export const prerender = false;
import MainLayout from "../../../layouts/MainLayout.astro";
import { getCompositions } from "../../../content/config";
import SinglePageBlogMode from "../../../layouts/SinglePageBlogMode.astro";
import CompositionsList from "../../../components/CompositionsList.astro";
import { getLangFromUrl, useTranslations } from "../../../i18n/utils";
import { Separator } from "../../../components/ui/separator";
const t = useTranslations(getLangFromUrl(Astro.url));
export async function getStaticPaths() {
return ["en", "fr", "cs", "de"].map((lang) => {
return { params: { lang } };
});
}
var songs = await getCompositions()
songs = songs.reverse()
---
<MainLayout
title={t("music")["pageTitle"]}
description={t("music")["description"]}
lang={Astro.currentLocale}
>
<SinglePageBlogMode>
<div class="p-4">
<h4 class="mb-2 text-3xl font-semibold leading-none text-foreground">{t("music")["title"]}</h4>
<p class="mb-4 text-md leading-none text-foreground">{t("music")["description"]}</p>
<Separator className="my-4"/>
<CompositionsList songs={songs}/>
</div>
</SinglePageBlogMode>
</MainLayout>