Fixing and Sitemap and Robots.txt

This commit is contained in:
2023-12-10 17:14:10 +01:00
parent 3d95bffb6a
commit 6c9c496f05
33 changed files with 150 additions and 57 deletions

View File

@ -2,6 +2,7 @@
import {getCollection} from 'astro:content'
import {astroI18n, createGetStaticPaths, t} from "astro-i18n";
import PageLayout from "../layouts/PageLayout.astro";
import LanguageWarning from "../components/LanguageWarning.astro";
export const getStaticPaths = createGetStaticPaths(async () => {
let posts = await getCollection("pages", value => value.id.split("/")[0] === astroI18n.locale);
@ -32,10 +33,7 @@ const { Content } = await page.render();
<PageLayout title={page.data.title}>
<article>
{page.data.german && (
<div class="bg-yellow-100 border-l-4 border-yellow-500 text-yellow-700 p-4" role="alert">
<div class="font-bold">{t("warning.title", {}, {route: "/rules"})}</div>
<div>{t("warning.text", {}, {route: "/rules"})}</div>
</div>
<LanguageWarning />
)}
<h1 class="text-left">{page.data.title}</h1>
<Content />