Skip to content

Commit

Permalink
docs: display GitHub button on homepage (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Feb 12, 2025
1 parent b89ad3c commit 044af5d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"devDependencies": {
"@rsbuild/core": "~1.2.7",
"@rslib/tsconfig": "workspace:*",
"@rstack-dev/doc-ui": "1.6.0",
"@rstack-dev/doc-ui": "1.7.1",
"@types/node": "^22.8.1",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
Expand Down
12 changes: 4 additions & 8 deletions website/theme/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@ export function Hero() {
const navigate = useNavigate();
const tUrl = useI18nUrl();
const t = useI18n<typeof import('i18n')>();
const handleClickGetStarted = () => {
navigate(tUrl('/guide/start/index'));
};
const handleClickLearnMore = () => {
const onClickGetStarted = () => {
navigate(tUrl('/guide/start/quick-start'));
};
return (
<BaseHero
showStars
onClickGetStarted={handleClickGetStarted}
onClickLearnMore={handleClickLearnMore}
onClickGetStarted={onClickGetStarted}
title="Rslib"
subTitle={t('subtitle')}
description={t('slogan')}
logoUrl="https://assets.rspack.dev/rslib/rslib-logo.svg"
getStartedButtonText={t('introduction')}
learnMoreButtonText={t('quickStart')}
getStartedButtonText={t('quickStart')}
githubURL="https://github.com/web-infra-dev/rslib"
/>
);
}

0 comments on commit 044af5d

Please sign in to comment.