Skip to content

refactor(website): decompose monolithic landing page into reusable Astro components#1

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/add-docs-site-with-starlight
Closed

refactor(website): decompose monolithic landing page into reusable Astro components#1
Copilot wants to merge 3 commits intomainfrom
copilot/add-docs-site-with-starlight

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 13, 2026

src/pages/index.astro was a 610-line monolith with all styles, markup, and logic inlined. Extracted every logical section into a focused, independently maintainable component under src/components/.

Component breakdown

  • BaseLayout.astro — html shell, CSS custom properties, shared utilities (.btn, .section-*)
  • NavBar.astro — sticky nav; links driven by a typed array
  • CodeBlock.astro — reusable macOS-style code window (filename prop + <slot>)
  • HeroSection.astro — hero grid, composes CodeBlock
  • PipelineSection.astro — pipeline flow diagram; steps driven by an array
  • FeatureCard.astro — single card (icon/title props + <slot> for description HTML)
  • FeaturesSection.astro — 8-card grid, composes FeatureCard
  • InstallCTA.astro — install box
  • SiteFooter.astro — footer

index.astro is now a 19-line composition:

<BaseLayout>
  <NavBar />
  <HeroSection />
  <PipelineSection />
  <FeaturesSection />
  <InstallCTA />
  <SiteFooter />
</BaseLayout>

CodeBlock and FeatureCard are generic enough to reuse in doc pages. Each component owns its scoped styles; global tokens stay in BaseLayout as is:global.

Copilot AI and others added 2 commits April 13, 2026 12:54
…g page, and full doc migration

Agent-Logs-Url: https://github.com/100gle/bub/sessions/6f521346-ba7f-4be7-9266-de44c23f0ebd

Co-authored-by: 100gle <36526527+100gle@users.noreply.github.com>
…d API docs

- Replace per-component <style> blocks with Tailwind CSS v4 utility classes
  (@tailwindcss/vite plugin; @theme{} tokens in custom.css)
- Inline CodeBlock into HeroSection and FeatureCard into FeaturesSection
  to reduce over-granular component splitting
- Move docs content from en/ to root level (root locale config) to fix
  Starlight 0.33.2 sidebar slug resolution on 404 page render
- Add src/content.config.ts for Astro 5.18+ explicit collection config
- Create missing api/skills.mdx and api/tools.mdx referenced in sidebar
- Fix sidebar slug entries for Starlight 0.33.2 compatibility
- Fix /en/ hrefs → / throughout NavBar, HeroSection, InstallCTA

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI requested a review from 100gle April 13, 2026 15:25
Copilot stopped work on behalf of 100gle due to an error April 13, 2026 15:50
@100gle 100gle closed this Apr 13, 2026
@100gle 100gle deleted the copilot/add-docs-site-with-starlight branch April 14, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants