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

Add theme option to set the search bar placeholder message #339

Open
eugelito opened this issue May 15, 2023 · 0 comments
Open

Add theme option to set the search bar placeholder message #339

eugelito opened this issue May 15, 2023 · 0 comments

Comments

@eugelito
Copy link

I would like to request an ability to add a way to set my own placeholder message in the search bar. I was thinking this could be a theme option.

Theme Options

Name Type Default Description
searchPlaceholder string "Search" Provide a custom placeholder message to the search bar.
// In your `docusaurus.config.js`:
module.exports = {
  // ... Your other configurations.
  themes: [
    // ... Your other themes.
    [
      require.resolve("@easyops-cn/docusaurus-search-local"),
      /** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
      ({
        // ... Your options.
        // Set custom message for search bar placeholder
        searchPlaceholder: "Search documentation",
      }),
    ],
  ],
};```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant