chore: init

This commit is contained in:
enscribe 2024-09-10 10:08:41 -07:00
commit f6dcc302d4
No known key found for this signature in database
GPG key ID: 9BBD5C4114E25322
118 changed files with 13645 additions and 0 deletions

View file

@ -0,0 +1,23 @@
---
import type { Heading } from "./TableOfContents.astro";
import Link from "./Link.astro";
// https://kld.dev/building-table-of-contents/
const { heading } = Astro.props;
---
<li class="list-inside list-disc px-6 py-1.5 text-sm">
<Link href={"#" + heading.slug} underline>
{heading.text}
</Link>
{
heading.subheadings.length > 0 && (
<ul class="translate-x-3">
{heading.subheadings.map((subheading: Heading) => (
<Astro.self heading={subheading} />
))}
</ul>
)
}
</li>