chore: website tooling (#41)

This commit is contained in:
Darius Cepulis
2025-10-08 15:35:50 -05:00
committed by GitHub
parent d2a0b27272
commit 1bb8166704
53 changed files with 5218 additions and 326 deletions
@@ -0,0 +1,40 @@
---
import {
type SupportedFramework,
type AnySupportedStyle,
type Guide,
type Section,
isSection,
} from '@/types/docs';
type Props = {
item: Guide | Section;
framework: SupportedFramework;
style: AnySupportedStyle;
docTitles: Map<string, string>;
};
const { item, framework, style, docTitles } = Astro.props;
---
{
isSection(item) ? (
<details open>
<summary>{item.sidebarLabel}</summary>
{item.contents.map((contentItem) => (
<Astro.self
item={contentItem}
framework={framework}
style={style}
docTitles={docTitles}
/>
))}
</details>
) : (
<div class="sidebar-guide">
<a href={`/docs/framework/${framework}/style/${style}/${item.slug}/`}>
{item.sidebarLabel || docTitles.get(item.slug) || item.slug}
</a>
</div>
)
}