Cyril Šebek 85d38eb3d5
SEO optimizations
SEO optimizations using astro-seo and SEO component
Modified i18n to incorporate complex SEO
2024-07-09 15:59:09 +02:00

50 lines
1.4 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()
const og = {
basic: {
title: t("music")["title"],
type: "website",
image: t("favicon")
},
optional: {
description: t("music")["ogDescription"],
locale: getLangFromUrl(Astro.url),
siteName: "Cyril Šebek"
}
};
---
<MainLayout
title={t("music")["pageTitle"]}
description={t("music")["ogDescription"]}
lang={Astro.currentLocale}
openGraph={og}
>
<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>