Skip to content

Commit 044af5d

Browse files
authored
docs: display GitHub button on homepage (#751)
1 parent b89ad3c commit 044af5d

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

pnpm-lock.yaml

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"devDependencies": {
1212
"@rsbuild/core": "~1.2.7",
1313
"@rslib/tsconfig": "workspace:*",
14-
"@rstack-dev/doc-ui": "1.6.0",
14+
"@rstack-dev/doc-ui": "1.7.1",
1515
"@types/node": "^22.8.1",
1616
"@types/react": "^19.0.8",
1717
"@types/react-dom": "^19.0.3",

website/theme/components/Hero.tsx

+4-8
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,19 @@ export function Hero() {
77
const navigate = useNavigate();
88
const tUrl = useI18nUrl();
99
const t = useI18n<typeof import('i18n')>();
10-
const handleClickGetStarted = () => {
11-
navigate(tUrl('/guide/start/index'));
12-
};
13-
const handleClickLearnMore = () => {
10+
const onClickGetStarted = () => {
1411
navigate(tUrl('/guide/start/quick-start'));
1512
};
1613
return (
1714
<BaseHero
1815
showStars
19-
onClickGetStarted={handleClickGetStarted}
20-
onClickLearnMore={handleClickLearnMore}
16+
onClickGetStarted={onClickGetStarted}
2117
title="Rslib"
2218
subTitle={t('subtitle')}
2319
description={t('slogan')}
2420
logoUrl="https://assets.rspack.dev/rslib/rslib-logo.svg"
25-
getStartedButtonText={t('introduction')}
26-
learnMoreButtonText={t('quickStart')}
21+
getStartedButtonText={t('quickStart')}
22+
githubURL="https://github.com/web-infra-dev/rslib"
2723
/>
2824
);
2925
}

0 commit comments

Comments
 (0)