Skip to content

Commit ede3ef5

Browse files
committed
update readme
1 parent 63857e9 commit ede3ef5

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This plugin provides full-text search functionality for **VuePress v2**. It is designed to address the search needs of VuePress sites, offering a fast and efficient way to search through the content of your site. The plugin automatically generates a search index from your site's pages and provides a simple way for users to search through the content.
66

7-
This plugin is built to work with the latest version of VuePress, but also maintains backward compatibility for VuePress versions up to **v2.0.0-beta.43**. It ensures smooth transitions for users upgrading their VuePress projects.
7+
This plugin is built to work with the latest version of VuePress.
88

99
##### Features
1010

@@ -13,11 +13,31 @@ This plugin is built to work with the latest version of VuePress, but also maint
1313
- **HMR Support**: Includes Hot Module Replacement (HMR) code to allow live updates of the search index during development.
1414
- **Search Index Generation**: A script that generates the search index by extracting relevant data from your site's pages.
1515

16-
##### Installation
16+
##### Installation & use
1717

1818
To install the plugin, follow these steps:
1919

2020
1. **Install the plugin** via npm:
2121

2222
```bash
2323
npm install vuepress-serach-plugin --save
24+
25+
2. ***usage** in config.js
26+
```
27+
import fullTextSearchPlugin from "vuepress-serach-plugin";
28+
29+
export default defineUserConfig({
30+
plugins: [
31+
fullTextSearchPlugin({
32+
locales: {
33+
'/': {
34+
placeholder: 'Search',
35+
},
36+
'/zh/': {
37+
placeholder: '搜索',
38+
},
39+
},
40+
})
41+
],
42+
)}
43+
```

0 commit comments

Comments
 (0)