Fixing and Sitemap and Robots.txt
This commit is contained in:
@ -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 />
|
||||
|
||||
@ -4,6 +4,7 @@ import {getCollection, CollectionEntry} from "astro:content";
|
||||
import PageLayout from "../../layouts/PageLayout.astro";
|
||||
import {TagSolid, CalendarMonthSolid} from "flowbite-svelte-icons"
|
||||
import TagComponent from "../../components/TagComponent.astro";
|
||||
import LanguageWarning from "../../components/LanguageWarning.astro";
|
||||
|
||||
export const getStaticPaths = createGetStaticPaths(async () => {
|
||||
const posts = await getCollection('announcements', entry => entry.id.split('/')[0] === astroI18n.locale);
|
||||
@ -49,10 +50,7 @@ const { Content } = await post.render();
|
||||
year: 'numeric'
|
||||
}).format(post.data.created)} </h5>
|
||||
{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 />
|
||||
)}
|
||||
<Content />
|
||||
<script>
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
import {getCollection, CollectionEntry} 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("rules", value => value.id.split("/")[0] === astroI18n.locale);
|
||||
@ -34,10 +35,7 @@ const { Content } = await page.render();
|
||||
<PageLayout title={t("title", {mode: t(`${page.data.translationKey}.title`, {}, {route: "/rules"})}, {route: "/rules"})}>
|
||||
<article>
|
||||
{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 />
|
||||
)}
|
||||
<Content />
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user