Skip to content

Commit a163a62

Browse files
Copilotweareoutman
andcommitted
docs: Add searchBarShortcutKeymap option to README
Co-authored-by: weareoutman <2338946+weareoutman@users.noreply.github.com>
1 parent 0ecd0c2 commit a163a62

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ module.exports = {
5959
// For Docs using Chinese, it is recomended to set:
6060
// language: ["en", "zh"],
6161

62+
// Customize the keyboard shortcut to focus search bar (default is "mod+k"):
63+
// searchBarShortcutKeymap: "s", // Use 'S' key
64+
// searchBarShortcutKeymap: "ctrl+shift+f", // Use Ctrl+Shift+F
65+
6266
// If you're using `noIndex: true`, set `forceIgnoreNoIndex` to enable local index:
6367
// forceIgnoreNoIndex: true,
6468
}),
@@ -92,6 +96,7 @@ module.exports = {
9296
| ignoreCssSelectors | string \| string[] | `[]` | A list of css selectors to ignore when indexing each page. |
9397
| searchBarShortcut | boolean | `true` | Whether to enable keyboard shortcut to focus in search bar. |
9498
| searchBarShortcutHint | boolean | `true` | Whether to show keyboard shortcut hint in search bar. Disable it if you need to hide the hint while shortcut is still enabled. |
99+
| searchBarShortcutKeymap | string | `"mod+k"` | Custom keyboard shortcut to focus the search bar. Supports formats like: `"s"` for single key, `"ctrl+k"` for key combinations, `"mod+k"` for Command+K (Mac) / Ctrl+K (others) - recommended cross-platform option, `"ctrl+shift+k"` for multiple modifiers. |
95100
| searchBarPosition | `"auto"` \| `"left"` \| `"right"` | `"auto"` | The side of the navbar the search bar should appear on. By default, it will try to autodetect based on your docusaurus config according to [the docs](https://docusaurus.io/docs/api/themes/configuration#navbar-search). |
96101
| docsPluginIdForPreferredVersion | string | | When you're using multi-instance of docs, set the docs plugin id which you'd like to check the preferred version with, for the search index. |
97102
| zhUserDict | string | | Provide your custom dict for language of zh, [see here](https://github.com/fxsjy/jieba#%E8%BD%BD%E5%85%A5%E8%AF%8D%E5%85%B8) |

0 commit comments

Comments
 (0)