---
import type { GetStaticPaths } from "astro";
import { render } from "astro:content";
import { data } from "~/data/data";

export const getStaticPaths = (async () => {
  const skills = await data.skills.getAll();
  return skills.map((skill) => ({
    params: { id: skill.id }
  }));
}) satisfies GetStaticPaths;

const skill= await data.skills.get(Astro.params.id)
const { Content } = await render(skill);
---

<h1>Hello {skill.data.name}</h1>
<Content />
