Add EsLint

This commit is contained in:
2023-12-23 15:36:22 +01:00
parent 5a5cce199b
commit 8fcab610fb
22 changed files with 2215 additions and 468 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";
@@ -8,14 +8,13 @@ export const getStaticPaths = createGetStaticPaths(async () => {
return posts.filter(value => value.id.split("/")[0] === astroI18n.locale).map((page) => ({
props: { page }, params: { slug: page.slug }
}) )
})
}) );
});
const { page } = Astro.props;
const { Content } = await page.render();
---
<NavbarLayout title={page.data.title}>
<article>
<h1 class="text-left">{page.data.title}</h1>

View File

@@ -2,7 +2,6 @@
import {getCollection} from "astro:content";
import {astroI18n} from "astro-i18n";
import NavbarLayout from "../../layouts/NavbarLayout.astro";
import {l} from "../../util/util";
import PageLayout from "../../layouts/PageLayout.astro";
let posts = await getCollection("help", entry => entry.id.split("/")[0] === astroI18n.locale);
@@ -13,9 +12,9 @@ let posts = await getCollection("help", entry => entry.id.split("/")[0] === astr
<h1>Helpcenter</h1>
<h1 class="text-red-700 text-4xl">WIP!</h1>
{posts.map(value => (
<a href={l("/help/" + value.slug)}>
<h2>{value.data.title}</h2>
</a>
<a href={l("/help/" + value.slug)}>
<h2>{value.data.title}</h2>
</a>
))}
</div>
</PageLayout>