1- import { Flexbox , Snippet , Text } from "@lobehub/ui" ;
2- import { LandingHero , LandingSection } from "@lobehub/ui/awesome" ;
1+ import {
2+ ClaudeCode ,
3+ Codex ,
4+ Cursor ,
5+ GithubCopilot ,
6+ Windsurf ,
7+ } from "@lobehub/icons" ;
8+ import { Flexbox , Text } from "@lobehub/ui" ;
9+ import {
10+ AgentSkillCard ,
11+ LandingHero ,
12+ LandingSection ,
13+ } from "@lobehub/ui/awesome" ;
14+ import { GithubIcon } from "@lobehub/ui/icons" ;
315import { ArrowRight } from "lucide-react" ;
4- import { useCallback } from "react" ;
516import { useNavigate } from "react-router" ;
617
718import Playground from "../../src/Streamdown/demos/Playground" ;
8- import { ApiSection } from "./ApiSection" ;
919import { Features } from "./Features" ;
1020import { HeroDemo } from "./HeroDemo" ;
1121import { renderLink } from "./renderLink" ;
1222
23+ const SITE_URL = "https://streamdown.lobehub.com" ;
1324const REPO = "https://github.com/lobehub/streamdown" ;
1425const NPM = "https://www.npmjs.com/package/@lobehub/streamdown" ;
15- const INSTALL_COMMAND = "pnpm add @lobehub/streamdown" ;
1626
17- // Mirrors the original Vite site (f3ba7b3:site/src/App.tsx): Hero → Features → Playground → API.
27+ const AGENTS = [
28+ { avatar : ClaudeCode . Avatar , title : "Claude Code" } ,
29+ { avatar : Codex . Avatar , title : "Codex" } ,
30+ { avatar : Cursor . Avatar , title : "Cursor" } ,
31+ { avatar : GithubCopilot . Avatar , title : "GitHub Copilot" } ,
32+ { avatar : Windsurf . Avatar , title : "Windsurf" } ,
33+ ] ;
34+
35+ // Standard landing hero (building-landing-home) with the original hero stream below it, then the
36+ // original Vite site's sections (f3ba7b3:site/src/App.tsx): Features → Playground → footer.
1837export default function Home ( { description } : { description : string } ) {
1938 const navigate = useNavigate ( ) ;
20- // In-page anchors (#playground, #api) scroll; everything else goes through the router.
21- const onNavigate = useCallback (
22- ( href : string ) => {
23- if ( href . startsWith ( "#" ) ) {
24- document
25- . getElementById ( href . slice ( 1 ) )
26- ?. scrollIntoView ( { behavior : "smooth" } ) ;
27- return ;
28- }
29- navigate ( href ) ;
30- } ,
31- [ navigate ] ,
32- ) ;
3339
3440 return (
3541 < >
36- < span hidden data-pagefind-meta = { `description:${ description } ` } />
3742 < LandingHero
38- accent = { "as it arrives " }
43+ accent = { "Streaming Markdown " }
3944 renderLink = { renderLink }
45+ title = { < span data-pagefind-meta = "title" > Streamdown</ span > }
4046 actions = { [
4147 {
4248 href : "/guide/getting-started" ,
@@ -45,26 +51,42 @@ export default function Home({ description }: { description: string }) {
4551 label : "Get Started" ,
4652 primary : true ,
4753 } ,
48- { href : "#playground" , label : "Try the playground " } ,
54+ { href : REPO , icon : GithubIcon , label : "GitHub " } ,
4955 ] }
50- badge = {
51- < span >
52- < b > New</ b > Block-level caching, 2× less main-thread time
53- </ span >
56+ aside = {
57+ < AgentSkillCard
58+ agents = { AGENTS }
59+ agent = { {
60+ code : `Read ${ SITE_URL } /skills.md and follow it to render streaming LLM markdown with @lobehub/streamdown.` ,
61+ description :
62+ "Send this prompt to your agent to wire up Streamdown" ,
63+ } }
64+ footer = {
65+ < >
66+ < a href = { "/skills.md" } rel = { "noreferrer" } target = { "_blank" } >
67+ skills.md
68+ </ a >
69+ < a href = { "/llms.txt" } rel = { "noreferrer" } target = { "_blank" } >
70+ llms.txt
71+ </ a >
72+ </ >
73+ }
74+ human = { {
75+ code : "pnpm add @lobehub/streamdown" ,
76+ description : "Install Streamdown into your React project" ,
77+ } }
78+ />
5479 }
5580 description = {
56- "A headless streaming markdown engine for React. Per-character reveal, block-level caching, and a LaTeX guard that keeps half-typed math from breaking mid-stream. Ships zero styles."
81+ < span data-pagefind-meta = "description" > { description } </ span >
5782 }
58- title = {
59- < span data-pagefind-meta = "title:Streamdown" > Render markdown</ span >
60- }
61- onNavigate = { onNavigate }
62- >
63- < Flexbox align = { "center" } gap = { 32 } width = { "100%" } >
64- < Snippet language = { "sh" } > { INSTALL_COMMAND } </ Snippet >
65- < HeroDemo />
66- </ Flexbox >
67- </ LandingHero >
83+ onNavigate = { navigate }
84+ />
85+
86+ { /* Outside LandingHero so body text is not centered by the hero's textAlign. */ }
87+ < div style = { { marginBlock : 8 , textAlign : "left" , width : "100%" } } >
88+ < HeroDemo />
89+ </ div >
6890
6991 < LandingSection id = { "home-features" } >
7092 < Features />
@@ -87,21 +109,6 @@ export default function Home({ description }: { description: string }) {
87109 </ LandingSection >
88110 </ div >
89111
90- < div id = { "api" } >
91- < LandingSection
92- id = { "home-api" }
93- title = { "API" }
94- description = {
95- < >
96- Props on the < code > <Streamdown /></ code > component, rendered
97- by Streamdown itself.
98- </ >
99- }
100- >
101- < ApiSection />
102- </ LandingSection >
103- </ div >
104-
105112 < Flexbox
106113 horizontal
107114 align = { "center" }
0 commit comments