[Bug]: action.link in HomeHero Component doesn't generate link with language prefix
Version
-
Details
https://github.com/web-infra-dev/rspress/blob/main/packages/theme-default/src/components/HomeHero/index.tsx#L66
we need to manually add zh prefix to config link in zh docs
Reproduce link
https://github.com/web-infra-dev/rspress/blob/main/packages/document/docs/zh/index.md?plain=1#L17
Reproduce Steps
- pnpm run dev
I think it should be resolved by the compiler, as most of the other links are done through the compiler.
In addition, if dynamic linking is required, it should be resolved through the theme to use useLang with normalizeHref.
I think it should be resolved by the compiler, as most of the other links are done through the compiler. In addition, if dynamic linking is required, it should be resolved through the theme to use
useLangwithnormalizeHref.
This is a point that can be optimized. The experience should be the same as the link in the mdx file, with the lang prefix automatically added. Currently, the hero component has no related normalizeHref operation.
I think it should be resolved by the compiler, as most of the other links are done through the compiler. In addition, if dynamic linking is required, it should be resolved through the theme to use
useLangwithnormalizeHref.This is a point that can be optimized. The experience should be the same as the link in the mdx file, with the lang prefix automatically added. Currently, the hero component has no related
normalizeHrefoperation.
So, how should I solve this problem? Compiler or Component (theme-default)
So, how should I solve this problem? Compiler or Component (theme-default)
I think component is better for theme related like i18n and multiversion. @sanyuan0704 What's your opinion?