Skip to content

feat(website): replace Starlight with custom Astro resource browser UI#2173

Open
JhonHander wants to merge 27 commits into
github:mainfrom
JhonHander:refactor/website-v2
Open

feat(website): replace Starlight with custom Astro resource browser UI#2173
JhonHander wants to merge 27 commits into
github:mainfrom
JhonHander:refactor/website-v2

Conversation

@JhonHander

@JhonHander JhonHander commented Jul 1, 2026

Copy link
Copy Markdown

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the staged branch for this pull request.

Note: Items 3-6 are unchecked because this is a website infrastructure refactor, not a new content submission (agent, instruction, skill, etc.). No new resource files were added.


Summary

Replaces the Starlight-based website with a custom Astro UI system for browsing resources (agents, instructions, skills, hooks, plugins, workflows, tools) and learning hub documentation.

Motivation: The current Starlight site provides a vanilla documentation experience. This refactor introduces a modern resource browsing interface with filtering, search, modals, and detail pages — while keeping the upstream data generation pipeline and learning content intact.

What Changed

Architecture (126 files, +19k / -7.4k lines)

New UI system:

  • website/src/layouts/ — BaseLayout and docs/resource shells replacing Starlight layouts
  • website/src/components/ui/ — UI primitives (Buttons, Badges, etc.)
  • website/src/components/resource/ — ResourceCard, ResourceFilters, ResourceGrid, ResourceModal
  • website/src/components/layout/ — Navigation, Footer

Pages migrated to BaseLayout:

  • agents.astro, instructions.astro, skills.astro, hooks.astro, plugins.astro, workflows.astro, tools.astro
  • index.astro (home page)

New features:

  • Resource detail pages (ResourceDetailPage.astro)
  • Search client with inline filtering (search-client.ts)
  • URL state management (url-state.ts) for filter/share persistence
  • Share modal (ShareModal.astro, share-modal.ts)
  • Resource catalog client scripts (resource-catalog.ts, resource-detail.ts)
  • Contributors section component and page

Preserved upstream contracts:

  • eng/generate-website-data.mjs — data generation (minimal changes for agent name normalization)
  • website/public/data/ — unchanged output
  • website/src/content/docs/learning-hub/ — unchanged upstream docs

Design system:

  • website/src/styles/tokens.css — Design tokens
  • website/src/styles/global.css — Completely rewritten
  • website/DESIGN.md — Component and design documentation

Not changed

  • Upstream JSON data schemas
  • Repository content outside website/
  • CI/CD and deployment paths

Screenshots

/home
demo

/agent
demo-2

/detail
demo-4

/learning-hub
demo-3

- BaseLayout.astro: custom layout replacing StarlightPage wrapper
  with head, navigation, footer, and slot-based content area
- Site config (site.ts, nav.ts): centralized site metadata, navigation
  links, and footer links
- Layout components: Navigation.astro (desktop + mobile drawer),
  Footer.astro (links, social, copyright)
- UI primitives: Button, Card, Badge, Icon, Container, Accordion,
  8BitButton, RetroResourceCard
- Add copilot-icon.png for navigation branding
Resource components:
- ResourceCard.astro: pixel-art card with type icon, badges, and hover
- ResourceFilters.astro: terminal-style filter bar with checkboxes
- ResourceGrid.astro: responsive 3-column grid layout
- ResourceModal.astro: detail modal with client:only interactivity
- ResourceSearch.astro: search input with debounce and clear button

Page sections:
- HeroSection.astro: hero banner with gradient and CTA
- Hero.astro: legacy hero (kept for backward compat)
- CTASection.astro: call-to-action with retro styling
- FaqSection.astro: accordion-based FAQ
- SearchBar.astro: standalone search bar component
- SectionCards.astro: resource type summary cards
- Stats.astro: pixel stat counter cards
Library layer:
- types.ts: shared TypeScript interfaces (ResourceItem, FilterState,
  ModalState, ResourceCardProps)
- upstream-types.ts: typed interfaces for manifest, search index,
  agents, instructions, skills, and hooks JSON schemas
- adapters/: manifest and search index adapters that normalize
  upstream JSON data into typed summaries
- search/: filter logic, fuzzy search, and URL state sync utilities

Client scripts:
- filters.ts: filter state management with URL sync
- search-client.ts: Pagefind search integration
- url-state.ts: URL parameter encoding/decoding for filters
- modal-client.ts: modal open/close/keyboard handling

- Add openspec/ directory for specification tracking
- Disable Starlight's built-in pagefind (pagefind: false) to avoid
  building duplicate search indexes
- Remove virtual:starlight/pagefind-config import from Search.astro
- Rewrite pagefind-resources.ts to use explicit addHTMLFile instead of
  addDirectory, skipping /agent/* pages (already indexed as resource
  records)
- Add collectHtmlFiles() and toPagefindUrl() helpers for fine-grained
  control over which pages enter the search index
- Log indexed page count and skipped agent detail pages
- index.astro: replace StarlightPage with BaseLayout, render
  HeroSection, CTASection, FaqSection with adapted manifest/search data
- agents.astro: replace StarlightPage with BaseLayout, use ResourceGrid,
  ResourceFilters, ResourceModal with client-side search and URL sync
- instructions.astro: same pattern as agents.astro for instructions
- agent.astro: new detail page for individual agent view
- instruction.astro: new detail page for individual instruction view
- Preserve upstream data adapters, fuzzy search, filter logic, URL
  state sync, and modal behavior from original pages
- Add PageFrame.astro: custom Starlight page frame with sidebar
  handling and Navigation integration
- Add Empty.astro: disable Starlight chrome (ThemeSelect) replaced
  by site navigation
- Register PageFrame and ThemeSelect overrides in astro.config.mjs
- Scope starlight-overrides.css to :root:has(learning-hub canonical)
  instead of global :root, using design system CSS custom properties
  for all Starlight color tokens
- Set content width (58rem) and sidebar width (18.75rem) for
  learning-hub readability
- Replace inline GitHub button markup with BitButton component
  (variant="secondary", size="sm")
- Remove duplicated .bit-btn CSS rules from Navigation.astro
  (now owned by 8BitButton.astro)
- Simplify header layout by removing .bit-btn-inner wrapper
- Add .console-select-control styles for Choices.js integration
  (inner, dropdown, multiple items, expanded list)
- Add .resource-card__preview display:contents reset for clickable
  card areas
- Add .resource-card__title and .resource-card__description margin
  resets
- Add .resource-card__tags styling for inline tag pills with
  border, background, and muted text
All five render scripts (hooks, plugins, skills, tools, workflows):
- Add getStableAccent() — deterministic hash-based color assignment
  (purple/blue/green/yellow) for consistent card accent colors
- Replace legacy .resource-info/.resource-title/.resource-description
  with .resource-card__topline, .resource-card__body,
  .resource-card__title, .resource-card__description structure
- Add type badge in topline (badge--blue/green/yellow/purple)
- Replace .resource-tag classes with plain <span> elements styled
  via .resource-card__tags
- Replace .resource-actions with .resource-card__footer
…yout

Migrate hooks, plugins, skills, tools, and workflows pages:
- Replace StarlightPage wrapper with BaseLayout
- Use Container + Card (console-header-card) for page headers
- Add computed stats in frontmatter (unique hooks, external count,
  asset counts, tag/trigger/category lists)
- Replace PageHeader with inline console header pattern (eyebrow,
  title, description)
- Keep EmbeddedPageData script tags for client-side rendering
- Preserve BackToTop and ContributeCTA components
- Maintain all existing filter/sort controls and resource-list
  containers for client-side interactivity
Detail pages (hook, plugin, skill, tool, workflow):
- Each page wraps BaseLayout + ResourceDetailPage with kind-specific
  props and initResourceDetail() client script

ResourceDetailPage.astro:
- Shared detail layout with breadcrumbs, hero panel, terminal-style
  header, feature/spec/metadata sections, install command with copy
- Client-side data fetching from JSON manifests

Client scripts:
- resource-catalog.ts: unified catalog client with search, filter
  (multi/single), URL state sync, accent color assignment, and
  keyboard navigation
- resource-detail.ts: detail page initializer — fetches resource
  data by kind, populates DOM elements, handles copy-to-clipboard
  for install commands
- Adjust main content padding (1.875rem 2.25rem) with max-width 60rem
- Remove redundant padding from .lg\:sl-flex container
- Reduce content-panel top padding to eliminate double-spacing
- Separate code block vs inline code styles:
  - pre: green left-border accent, elevated bg, 1rem padding
  - inline code: subtle border, green text, compact padding
- Widen right sidebar (flex: auto) with adjusted padding
- Fix responsive main padding at 72rem breakpoint
- Redesign BackToTop in 8-bit CLI style, remove from extensions page
- Restructure Footer brand layout with tagline and slogan
- Consolidate accordion toggle script into FaqSection
- Update copy across CTA, FAQ, and Hero sections
Copilot AI review requested due to automatic review settings July 1, 2026 02:40
@github-actions github-actions Bot added the new-submission PR adds at least one new contribution label Jul 1, 2026
@github-actions github-actions Bot added the website-update PR touches website content or code label Jul 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

# Conflicts:
#	website/src/pages/contributors.astro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-submission PR adds at least one new contribution website-update PR touches website content or code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants