---
import Heading from "@/components/Heading.astro";
import Section from "@/components/Section.astro";
import RootLayout from "@/layouts/RootLayout.astro";
import { marked } from "marked";
const response = await fetch("https://api.enrico.buehler.earth/api/imprint", {
    headers: {
        "Content-Type": "application/json; charset='utf-8'",
    },
});

const json = await response.json();
const markdownContent = json.data.attributes.content;

console.log(markdownContent);

const content = marked.parse(markdownContent);
---

<RootLayout title="Imprint">
    <Section>
        <Heading main>Imprint</Heading>
    </Section>
    <Section>
        <article set:html={content} />
    </Section>
</RootLayout>
