From 46ad64d5aaae8bbe381ec579500ab9b4267fa07c Mon Sep 17 00:00:00 2001 From: ayo Date: Tue, 21 Jul 2026 22:30:42 +0200 Subject: [PATCH] docs: surface create-wcb in the getting started guide and homepage --- docs/src/components/Hero.astro | 131 ++++++++++++++++-- .../content/docs/guides/getting-started.mdx | 21 +++ docs/src/content/docs/index.mdx | 4 - 3 files changed, 137 insertions(+), 19 deletions(-) diff --git a/docs/src/components/Hero.astro b/docs/src/components/Hero.astro index 2564614..1874c21 100644 --- a/docs/src/components/Hero.astro +++ b/docs/src/components/Hero.astro @@ -1,6 +1,8 @@ --- // Override of Starlight's Hero so the splash page's visual slot holds the -// live size chart instead of an image. Structure and styles mirror +// live size chart instead of an image, and the actions row carries a +// copyable `npm create wcb@latest` command chip beside the buttons +// (patterned on astro.build's hero). Structure and styles mirror // @astrojs/starlight/components/Hero.astro (0.39.1) — a page that declares // `hero.image` still gets the stock image treatment; pages without one get // the chart. @@ -10,6 +12,7 @@ import SizeChart from './SizeChart.astro' // mirrors starlight's own constant; not a public export const PAGE_TITLE_ID = '_top' +const CREATE_COMMAND = 'npm create wcb@latest' const { data } = Astro.locals.starlightRoute.entry const { title = data.title, tagline, image, actions = [] } = data.hero || {} @@ -55,23 +58,72 @@ if (image) {

{tagline &&
}
- { - actions.length > 0 && ( -
- {actions.map( - ({ attrs: { class: className, ...attrs } = {}, icon, link: href, text, variant }) => ( - - {text} - {icon?.html && } - - ) - )} -
- ) - } +
+ { + actions.map( + ({ attrs: { class: className, ...attrs } = {}, icon, link: href, text, variant }) => ( + + {text} + {icon?.html && } + + ) + ) + } +
+ {CREATE_COMMAND} + +
+
+ +