Skip to content

docs: rebuild the documentation website with Astro Starlight - #395

Merged
LucasBassetti merged 2 commits into
gh-pagesfrom
docs/modern-site
Sep 27, 2026
Merged

LucasBassetti merged 2 commits into
gh-pagesfrom
docs/modern-site

Conversation

@LucasBassetti

@LucasBassetti LucasBassetti commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Description

Rebuilds the documentation website (https://lucasbassetti.github.io/react-simple-chatbot/) for react-simple-chatbot 1.0. The old site was a React 16 / webpack 3 app that no longer built, with outdated content, broken share buttons and a dead Google Analytics tag. The new one uses Astro Starlight.

What's new

  • Home page with a live chatbot, features, a code sample and quick links.
  • Content for 1.0, rewritten from the library source: getting started (introduction, installation, quick start, TypeScript, migration from 0.x), 9 guides (steps, dynamic messages and branching, user input, custom components, theming, floating, cache, speech, frameworks), API reference (every prop with defaults, every step type, custom component props, exported types), FAQ, changelog and contributing.
  • 12 live examples: each one renders the file that is shown as its code, so the examples can't drift from what runs.
  • Playground: edit a chatbot with a live preview, start from templates, and share it with a link.
  • Docs features: full-text search, dark and light mode, table of contents, edit links, llms.txt, sitemap, Open Graph image, mobile layout.
  • Old links keep working: the hash URLs of the old site (/#/docs/installation...) redirect to the new pages.

How the branch works

GitHub Pages keeps serving this branch as it is, so no settings change is needed:

  • website/: the source (pages in website/src/content/docs, examples in website/src/examples).
  • The root: the built site. .nojekyll makes Pages serve the _astro/ folder.
  • The Site workflow type-checks and builds the site (with link validation) on every PR. After a merge, it rebuilds the root on Linux and commits it, so contributors only change website/ (npm run publish-site rebuilds the root locally when needed).

Where to start reviewing

  1. website/astro.config.mjs: site config, sidebar, legacy redirects.
  2. website/src/components/: Demo.astro + ExampleRenderer.tsx (live examples), Hero.astro + HeroChat.tsx (home), Playground.tsx.
  3. website/src/content/docs/: the pages.
  4. README.md and website/scripts/publish.mjs: how to develop and publish.

The root changes (_astro/, pagefind/, */index.html...) are generated.

Related issue

None.

Type of change

  • feat: new feature
  • fix: bug fix
  • docs: documentation
  • refactor / perf / test
  • build / ci / chore
  • Breaking change (the title has !, and the migration is described below)

How has this been tested?

The built root was served locally at /react-simple-chatbot/, like GitHub Pages does:

Check Result
astro check ✅ 0 errors
Build with internal link validation ✅ all links valid
All 34 pages load with the live demos rendered and no console errors, in Chromium, Firefox and WebKit ✅
Flows: simple form (with update), BMI, end callback, options, Wikipedia search (live API), floating open, search, playground edit/share/templates/errors ✅ 10/10
Old hash URLs redirect to the new pages ✅
Mobile (iPhone emulation): no horizontal overflow ✅
Site workflow on this PR ✅

A floating demo inside the page was covered by the sidebars (the Starlight content is an isolated stacking context), so floating examples render in document.body.

Breaking changes

None for the library. Old site URLs redirect; the only removed page is "Donate".

Checklist

  • The title follows Conventional Commits
  • npm run check and npm run build pass
  • Tests cover the change (browser tests above)
  • The README is updated

Replace the React 16 / webpack 3 site with an Astro Starlight site for
react-simple-chatbot 1.0.

- Source in website/, built site in the branch root (served by GitHub
  Pages); `npm run publish-site` rebuilds it
- Pages: getting started, guides, live examples, playground, API
  reference, FAQ, changelog and contributing
- Live examples render the same file shown as their code
- Playground with live preview, templates and share links
- Search, dark mode, llms.txt, sitemap, link validation, Open Graph image
- Old hash URLs (/#/docs/...) redirect to the new pages
- Removes the share buttons and the dead Google Analytics
- Site workflow type-checks, builds and checks the committed site
A build on Linux is not byte-identical to a build on macOS, so the pull request check no longer compares the committed root. Instead, the workflow rebuilds the root after a merge into gh-pages and commits it.
@LucasBassetti
LucasBassetti merged commit b6bc92d into gh-pages Sep 27, 2026
1 check passed
@LucasBassetti
LucasBassetti deleted the docs/modern-site branch September 27, 2026 09:09
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.

1 participant