SEO optimizations using astro-seo and SEO component Modified i18n to incorporate complex SEO
40 lines
1011 B
Plaintext
40 lines
1011 B
Plaintext
---
|
|
export const prerender = true
|
|
|
|
import MainLayout from "../../layouts/MainLayout.astro";
|
|
import Hero from "../../components/Hero.astro";
|
|
import About from "../../components/About.astro";
|
|
import Showcase from "../../components/Showcase.astro";
|
|
import FloatingLinks from "../../components/FloatingLinks.astro";
|
|
|
|
//@ts-ignore
|
|
import { getLangFromUrl, useTranslations } from "../../i18n/utils";
|
|
|
|
const t = useTranslations(getLangFromUrl(Astro.url));
|
|
|
|
export async function getStaticPaths() {
|
|
return ["en", "fr", "cs", "de"].map((lang) => {
|
|
return { params: { lang } };
|
|
});
|
|
}
|
|
|
|
const og = {
|
|
basic: {
|
|
title: t("title"),
|
|
type: "website",
|
|
image: t("favicon")
|
|
},
|
|
optional: {
|
|
description: t("description"),
|
|
locale: getLangFromUrl(Astro.url),
|
|
siteName: "Cyril Šebek"
|
|
}
|
|
}
|
|
|
|
---
|
|
<MainLayout title={t("title")} description={t("description")} openGraph={og} lang={Astro.currentLocale} themeOverride="theme_auto">
|
|
<FloatingLinks />
|
|
<Hero />
|
|
<About />
|
|
<Showcase />
|
|
</MainLayout> |