--- import Base from './Base.astro'; import DocsSidebar from '../components/DocsSidebar.astro'; import '../styles/sub-pages.css'; import '../styles/docs-kinpaku.css'; import { COMMAND_RELATIONSHIPS } from '../data/sub-pages-data'; import { getCommandDemo } from '../scripts/demos/commands/index.js'; interface Props { title: string; description: string; tagline: string; slug: string; category: string; allCommands: { slug: string; category: string }[]; } const { title, description, tagline, slug } = Astro.props; // Decide hero layout at build time: when a command has a registered demo // (in site/scripts/demos/commands/.js), the hero is a two-column grid // with the demo on the left and h1/lede on the right: same editorial // before/after side-by-side that the old site used. When no demo exists, // the hero stays single-column. const hasDemo = !!getCommandDemo(slug); const relationships = COMMAND_RELATIONSHIPS[slug] || {}; ---
{hasDemo ? ( /* Two-column editorial hero: h1 + lede on the left, demo on the right. The demo content is populated client-side by the script below from site/scripts/demos/commands/.js, same source the homepage uses. */
/impeccable

{slug}

{tagline &&

{tagline}

}
) : (
/impeccable

{slug}

{tagline &&

{tagline}

}
)}
{(relationships.leadsTo || relationships.pairs || relationships.combinesWith) && ( )}