-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configure locals > themeConfig.search
, it can't work
#3141
Comments
你好,现有版本关于搜索的配置你应该在 |
了解了。所以是这样:配置了多语言的情况下,使用 |
然后
进一步的分别配置在正式版1.0出来之前应该都不太会支持,当然可以期待一下另外一个 issue 提到的i18n解决方案 你指的 |
是的,就是这个 |
@vanchKong I think we should post it in English to engage with others. |
locals
下,配置 themeConfig.search
,无法正常工作locals > themeConfig.search
, it can't work
locals > themeConfig.search
, it can't worklocals > themeConfig.search
, it can't work
Regarding search I believe the recommended approach is https://vitepress.dev/reference/default-theme-search#local-search-i18n (it should be in top-level config, same for algolia too). Regarding In the meantime you can do something like: _render(src, env, md) {
if (env.relativePath.startsWith('/zh/') {
...
}
} |
|
Describe the bug
https://github.com/vanchKong/vitepress/tree/doc-zh
temporary modify
docs/locals/en.ts
&docs/locals/zh.ts
>themeConfig.search
torun
vitepress dev docs
,search
can't work successfullyReproduction
https://github.com/vanchKong/vitepress/tree/doc-zh
Expected behavior
locals > themeConfig.search
, and it could workmarkdown.container
should be supported in multi-language configurationsSystem Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: