Skip to content

Docs: rebuild on Astro Starlight (Terminal theme) + live-site rebrand#400

Merged
vishr merged 10 commits into
masterfrom
docs-astro-rebuild
Jun 15, 2026
Merged

Docs: rebuild on Astro Starlight (Terminal theme) + live-site rebrand#400
vishr merged 10 commits into
masterfrom
docs-astro-rebuild

Conversation

@vishr

@vishr vishr commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

Rebuilds the Echo docs from scratch on Astro + Starlight with a custom Terminal theme (site/), and cuts the GitHub Pages deploy over to it. Also rebrands the interim Docusaurus site (website/). Branch carries the design spec under docs/superpowers/specs/.

site/ — new Astro Starlight docs (main deliverable)

  • Custom Terminal theme: homepage hero, Ask Echo island (demo stub), themed asides/pager/tables/blockquotes/code-blocks/footer, dark-first.
  • Echo favicon + logo (new mark, not the LabStack cube) + OG/social card; full SEO/OG meta; descriptive homepage <title>.
  • ~56 content pages (Guide, Middleware, Cookbook) ported and reviewed against echo/v5 v5.0.4 source.
  • Search: Pagefind (built in) — no Algolia.
  • Live GitHub star count fetched at build time (src/data/github.ts), refreshed by a daily cron.

Deploy / cutover (GitHub Pages)

  • deploy.yaml now builds & publishes site/./site/dist (was website/). Merging to master makes echo.labstack.com serve the new site on the next deploy.
  • site/public/CNAME preserves the custom domain.
  • Redirects: all 64 legacy /docs/* URLs map to their new locations (generated in src/redirects.mjs; Astro emits a static meta-refresh page per URL — works on GitHub Pages, no _redirects needed). Verified live.
  • Google Analytics (G-H19TMZLQFN, anonymized IP) carried over so tracking continues.
  • Rollback = revert the cutover commit; the website/ Docusaurus source remains in the repo.

website/ — interim Docusaurus rebrand

New Echo favicon/logo + real social card (the configured docusaurus-social-card.jpg never existed). Retired after cutover.

Review fixes folded in

Verified against echo/v5 source: quickstart logger fix, Go version 1.23→1.25, removed 7 non-existent Default*Config symbols, fixed broken /middleware/timeout/ link, OTel import block, missing response examples, dated CDN/spec/RFC links refreshed (Bootstrap 5, jQuery 3.7, WHATWG Fetch, datatracker), modernized jQuery, description now schema-required, AskEcho null-guards + demo label, external-link rel.

Test

site/ builds clean (61 source pages, 124 emitted incl. redirects). All 64 live URLs resolve; redirects fire end-to-end; GA + CNAME present in dist.

🤖 Generated with Claude Code

vishr and others added 10 commits June 14, 2026 08:41
…ction)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…SEO, redirects, a11y, fonts)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the LabStack cube favicon/logo with Echo's own mark, add a real
1200x630 social card (the configured docusaurus-social-card.jpg never
existed), and the interim Docusaurus redesign (Ask Echo / DocActions,
custom theme, phosphor icons). This is the currently-live site; the
Astro rebuild in site/ supersedes it at cutover.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
From-scratch rebuild of the Echo v5 docs on Astro + Starlight with a
custom Terminal theme: homepage hero, Ask Echo island, themed asides,
pager, tables, code blocks and footer; Echo favicon + logo + OG card;
SEO/OG meta; and ~56 content pages (Guide, Middleware, Cookbook) ported
and reviewed against echo/v5 v5.0.4 source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Review fixes (site/):
- editLink baseUrl pointed at website/, now site/ (Edit-page links were wrong)
- wrap dark-first localStorage script in try/catch (no private-mode throw/FOUC)
- AskEcho: null-guard DOM lookups + early-return logging, clear pending timeout,
  add "Demo - not connected" label, fix stub echo-jwt v4 -> v5
- make content `description` schema-required (build-enforced; used for SEO/OG)
- add target=_blank rel=noopener noreferrer to external homepage links

Live GitHub stars:
- fetch star count at build time (src/data/github.ts) with graceful fallback;
  dedupe the two hardcoded "32.4k" spots to this single source
- add daily schedule cron + workflow_dispatch + authenticated GITHUB_TOKEN to the
  deploy workflow so the count refreshes without manual deploys

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- jsonp cookbook example: Bootstrap 3.3.5 (retired MaxCDN) -> Bootstrap 5.3.3
  (jsDelivr); jQuery 1.x (protocol-relative) -> jQuery 3.7.1 over https
- cors: obsolete W3C CORS spec URL -> WHATWG Fetch standard
- ip-address: tools.ietf.org RFC links -> datatracker.ietf.org (no redirect hop)
- deploy.yaml: clarify the daily cron refreshes build-time data once the deploy
  targets the Astro site at cutover

Link audit: internal links clean, external links verified live.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace deprecated jQuery APIs in the JSONP client demo:
- $(document).ready(fn) -> $(fn)
- .click(fn) -> .on("click", fn)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The old Docusaurus site served docs under /docs/... (guide pages flattened
via slug overrides). Add an Astro `redirects` map covering all 64 live
echo.labstack.com URLs -> their new locations, so nothing 404s after cutover
and SEO/backlinks survive. Astro emits a static meta-refresh page per entry,
which works on GitHub Pages (no _redirects file needed).

Also add site/public/CNAME so the custom domain survives when the deploy
target switches from website/ to site/ at cutover.

Verified: 64/64 live sitemap URLs resolve in the build (page or redirect).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move the /docs/* -> new-URL map into src/redirects.mjs, generated from the
content tree (middleware/cookbook 1:1, flattened guide pages) plus a small
explicit set for renamed/removed/category/search URLs. astro.config.mjs now
just imports it. Same 63 entries / static redirect pages emitted; verified
64/64 live URLs still resolve and redirects fire end-to-end.

(On a wildcard host like Cloudflare these collapse to ~6 _redirects lines.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tics

deploy.yaml now builds and publishes site/ (Astro -> ./site/dist) instead of
website/ (Docusaurus). Merging to master will make echo.labstack.com serve the
new site on the next deploy. Rollback = revert this commit (website/ source
remains in the repo).

Also carry over Google Analytics (G-H19TMZLQFN, anonymize_ip) into the Astro
site's head so tracking continues uninterrupted after cutover.

Verified: site/ builds clean, GA present on every page, CNAME in dist, all 64
legacy /docs/* URLs redirect.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vishr vishr merged commit 8b3285c into master Jun 15, 2026
1 check passed
@aldas

aldas commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@vishr is website folder now obsolete and if so - would you update https://github.com/labstack/echox/blob/master/README.md how to run website locally for testing

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