Skip to content

Commit 0731d61

Browse files
committed
Add search bar.
1 parent 0cf82cd commit 0731d61

File tree

5 files changed

+797
-9834
lines changed

5 files changed

+797
-9834
lines changed

docusaurus.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ module.exports = {
2121
},
2222
},
2323

24+
plugins: [
25+
[
26+
require.resolve('@cmfcmf/docusaurus-search-local'),
27+
/** @type {import('@cmfcmf/docusaurus-search-local').PluginOptions} */
28+
({
29+
indexDocs: true,
30+
indexBlog: true,
31+
indexPages: false,
32+
language: ['en', 'zh'],
33+
}),
34+
],
35+
],
36+
2437
presets: [
2538
[
2639
'classic',

i18n/en/code.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,5 +311,25 @@
311311
"theme.tags.tagsPageTitle": {
312312
"message": "Tags",
313313
"description": "The title of the tag list page"
314+
},
315+
"cmfcmf/d-s-l.searchBar.placeholder": {
316+
"message": "Search...",
317+
"description": "Placeholder shown in the searchbar"
318+
},
319+
"cmfcmf/d-s-l.searchBar.clearButtonTitle": {
320+
"message": "Clear",
321+
"description": "Title of the button to clear the current search input"
322+
},
323+
"cmfcmf/d-s-l.searchBar.detachedCancelButtonText": {
324+
"message": "Cancel",
325+
"description": "Text of the button to close the detached search window"
326+
},
327+
"cmfcmf/d-s-l.searchBar.submitButtonTitle": {
328+
"message": "Submit",
329+
"description": "Title of the button to submit a new search"
330+
},
331+
"cmfcmf/d-s-l.searchBar.noResults": {
332+
"message": "No results found.",
333+
"description": "message shown if no results are found"
314334
}
315335
}

i18n/en/docusaurus-plugin-content-docs/current.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
"version.label": {
33
"message": "Next",
44
"description": "The label for version current"
5+
},
6+
"sidebar.docs.category.Environment Setup": {
7+
"message": "Environment Setup",
8+
"description": "The label for category Environment Setup in sidebar docs"
59
}
610
}

0 commit comments

Comments
 (0)