Code Cleanup™
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user