docs: initial concepts and recipes (#147)

This commit is contained in:
Darius Cepulis
2025-10-29 23:28:55 -05:00
committed by GitHub
parent a3e26b1617
commit 9e4af60361
37 changed files with 777 additions and 84 deletions
-7
View File
@@ -1,7 +0,0 @@
---
// Simple container component for constraining content width in documentation
---
<div class="w-full max-w-3xl mx-auto">
<slot />
</div>
+4 -3
View File
@@ -2,11 +2,12 @@
import { isValidFramework, isValidStyleForFramework } from '@/types/docs';
import { resolveDocsLinkUrl } from '@/utils/docs/routing';
import type { HTMLAttributes } from 'astro/types';
import A from '../typography/A.astro';
interface Props extends Omit<HTMLAttributes<'a'>, 'href'> {
slug: string;
}
const { slug, ...rest } = Astro.props;
const { slug } = Astro.props;
const { framework: paramFramework, style: paramStyle } = Astro.params;
if (!paramFramework || !isValidFramework(paramFramework)) {
@@ -23,6 +24,6 @@ const { url: href } = resolveDocsLinkUrl({
});
---
<a href={href} {...rest}>
<A href={href}>
<slot />
</a>
</A>
+1 -1
View File
@@ -29,7 +29,7 @@ const isActive = containsActivePath(item);
{
isSection(item) ? (
<details open class="group" style={`padding-left: calc(var(--spacing) * ${depth * 4})`}>
<details open class="group my-4 first:mt-0" style={`padding-left: calc(var(--spacing) * ${depth * 4})`}>
<summary
class:list={[
'py-2 flex items-center gap-4 ',