File tree Expand file tree Collapse file tree 5 files changed +768
-829
lines changed Expand file tree Collapse file tree 5 files changed +768
-829
lines changed Original file line number Diff line number Diff line change 1
1
import { defaultTheme } from '@vuepress/theme-default'
2
2
import { defineUserConfig } from 'vuepress/cli'
3
3
import { viteBundler } from '@vuepress/bundler-vite'
4
- import { searchProPlugin } from " vuepress- plugin-search-pro" ;
4
+ import { searchPlugin } from '@ vuepress/ plugin-search'
5
5
6
6
export default defineUserConfig ( {
7
7
lang : 'en-US' ,
@@ -263,20 +263,17 @@ export default defineUserConfig({
263
263
] ,
264
264
} ,
265
265
} ) ,
266
-
266
+
267
267
plugins : [
268
- searchProPlugin ( {
269
- // Index all content
270
- indexContent : true ,
271
- // Customize the fields to index
272
- customFields : [
273
- {
274
- getter : ( page ) => page . frontmatter . tags ,
275
- formatter : "Tag: $content" ,
268
+ searchPlugin ( {
269
+ locales : {
270
+ '/' : {
271
+ placeholder : 'Search' ,
276
272
} ,
277
- ] ,
273
+ } ,
278
274
} ) ,
279
275
] ,
276
+
280
277
281
278
bundler : viteBundler ( {
282
279
viteOptions : {
Original file line number Diff line number Diff line change 3
3
--vp-c-accent : #f7931a ;
4
4
--vp-c-accent-hover : #ef8007 ;
5
5
--vp-c-accent-text : #fff ;
6
+ --search-c-bg : var (--vp-c-bg );
7
+ --search-c-accent : var (--vp-c-accent );
8
+ --search-c-text : var (--vp-c-text );
9
+ --search-c-border : var (--vp-c-gutter );
10
+ --search-c-item-text : var (--vp-c-text-subtle );
11
+ --search-c-item-focus : var (--vp-c-bg-alt );
12
+ --search-input-width : 8rem ;
13
+ --search-result-width : 20rem ;
6
14
}
7
15
8
16
.vp-hero-action-button.primary {
9
17
font-weight : bold ;
18
+ }
19
+
20
+ .search-box input {
21
+ border : 1px solid var (--vp-c-border ) !important ;
22
+ background-color : var (--vp-c-control ) !important ;
23
+ color : var (--vp-c-text ) !important ;
24
+ padding : 0 .9rem 0 2rem !important ;
25
+ font-size : 1rem !important ;
26
+ width : 150px !important ;
10
27
}
You can’t perform that action at this time.
0 commit comments