Skip to content
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

Is it possible to replace folders names (from the search context) to custom titles in dropdown options at the search page? #382

Closed
Elvehnn opened this issue Dec 14, 2023 · 4 comments · Fixed by #383
Labels
feature request help wanted Extra attention is needed

Comments

@Elvehnn
Copy link

Elvehnn commented Dec 14, 2023

image_2023-12-14_13-48-41

docusaurus.config:

themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
{
language: ["en"],
hashed: true,
indexDocs: true,
indexPages: true,
indexBlog: false,
docsRouteBasePath: "/",
searchContextByPaths: ["user-guide", "developer-guide", "admin-guide"],
hideSearchBarWithNoSearchContext: true,
},
],
],

package.json
"dependencies": {
"@docusaurus/core": "3.0.1",
"@docusaurus/preset-classic": "3.0.1",
"@easyops-cn/docusaurus-search-local": "^0.38.1",

@weareoutman
Copy link
Member

@Elvehnn Try 0.39.0 which supports searchContextByPaths: [{ label: "Community", path: "community" }]

image

@Elvehnn
Copy link
Author

Elvehnn commented Dec 15, 2023

Great! Thanx a lot!

@Elvehnn
Copy link
Author

Elvehnn commented Dec 15, 2023

weareoutman and it would be great to be able to use these labels with i18n for the multi-language apps.

@weareoutman
Copy link
Member

Try v0.40.0:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants