Code Cleanup™

This commit is contained in:
2024-02-11 11:16:23 +01:00
parent 4b27eb76fe
commit 9fd8ddb9bd
62 changed files with 663 additions and 519 deletions

View File

@@ -1,5 +1,5 @@
---
import { getCollection } from "astro:content";
import {getCollection} from "astro:content";
import NavbarLayout from "../../layouts/NavbarLayout.astro";
import {astroI18n, createGetStaticPaths} from "astro-i18n";
@@ -7,24 +7,24 @@ export const getStaticPaths = createGetStaticPaths(async () => {
let posts = await getCollection("help");
return posts.filter(value => value.id.split("/")[0] === astroI18n.locale).map((page) => ({
props: { page }, params: { slug: page.slug }
}) );
props: {page}, params: {slug: page.slug},
}));
});
const { page } = Astro.props;
const { Content } = await page.render();
const {page} = Astro.props;
const {Content} = await page.render();
---
<NavbarLayout title={page.data.title}>
<article>
<h1 class="text-left">{page.data.title}</h1>
<Content />
<Content/>
</article>
</NavbarLayout>
<style is:global>
article {
>* {
> * {
all: revert;
}