You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config/README.md
-18
Original file line number
Diff line number
Diff line change
@@ -98,24 +98,6 @@ The `serviceWorker` option only handles the service worker. To make your site fu
98
98
Also, only enable this if you are able to deploy your site with SSL, since service worker can only be registered under HTTPs URLs.
99
99
:::
100
100
101
-
### algolia
102
-
103
-
- Type: `Object`
104
-
- Default: `undefined`
105
-
106
-
The `algolia` option allows you to use [algolia docsearch](https://github.com/algolia/docsearch) to replace the simple built-in search. To enable it, you need to provide at least `apiKey` and `indexName`:
107
-
108
-
```js
109
-
module.exports= {
110
-
algolia: {
111
-
apiKey:'<API_KEY>',
112
-
indexName:'<INDEX_NAME>'
113
-
}
114
-
}
115
-
```
116
-
117
-
For more options, refer to [Algolia DocSearch's documentation](https://github.com/algolia/docsearch#docsearch-options).
Copy file name to clipboardExpand all lines: docs/default-theme-config/README.md
+34-4
Original file line number
Diff line number
Diff line change
@@ -199,8 +199,6 @@ Make sure to define the fallback configuration last.
199
199
VuePress checks each sidebar config from top to bottom. If the fallback configuration was first, VuePress would incorrectly match `/foo/` or `/bar/four.html` because they both start with `/`.
200
200
:::
201
201
202
-
203
-
204
202
### Auto Sidebar for Single Pages
205
203
206
204
If you wish to automatically generate a sidebar that contains only the header links for the current page, you can use `YAML front matter` on that page:
@@ -221,6 +219,38 @@ sidebar: false
221
219
---
222
220
```
223
221
222
+
## Search Box
223
+
224
+
### Built-in Search
225
+
226
+
You can disable the built-in search box with `themeConfig.search: false`, and customize how many suggestions to be shown with `themeConfig.searchMaxSuggestions`:
227
+
228
+
```js
229
+
module.exports= {
230
+
themeConfig: {
231
+
search:false,
232
+
searchMaxSuggestions:10
233
+
}
234
+
}
235
+
```
236
+
237
+
### Algolia Search
238
+
239
+
The `themeConfig.algolia` option allows you to use [Algolia DocSearch](https://community.algolia.com/docsearch/) to replace the simple built-in search. To enable it, you need to provide at least `apiKey` and `indexName`:
240
+
241
+
```js
242
+
module.exports= {
243
+
themeConfig: {
244
+
algolia: {
245
+
apiKey:'<API_KEY>',
246
+
indexName:'<INDEX_NAME>'
247
+
}
248
+
}
249
+
}
250
+
```
251
+
252
+
For more options, refer to [Algolia DocSearch's documentation](https://github.com/algolia/docsearch#docsearch-options).
253
+
224
254
## Prev / Next Links
225
255
226
256
Prev and next links are automatically inferred based on the sidebar order of the active page. You can also explicitly overwrite or disable them using `YAML front matter`:
@@ -245,9 +275,9 @@ module.exports = {
245
275
// Customising the header label
246
276
// Defaults to "GitHub"/"GitLab"/"Bitbucket" depending on `themeConfig.repo`
247
277
repoLabel:'Contribute!',
248
-
278
+
249
279
// Optional options for generating "Edit this page" link
250
-
280
+
251
281
// if your docs are in a different repo from your main project:
Copy file name to clipboardExpand all lines: docs/guide/deploy.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,6 @@ The following guides are based on a few shared assumptions:
24
24
25
25
2. Inside your project, create `deploy.sh` with the following content (with highlighted lines uncommented appropriately) and run it to deploy:
26
26
27
-
::: tip
28
-
You can also run this script in your CI setup to enable automatic deployment on each push.
29
-
:::
30
-
31
27
```bash{13,20,23}
32
28
#!/usr/bin/env sh
33
29
@@ -56,17 +52,21 @@ git commit -m 'deploy'
56
52
cd -
57
53
```
58
54
55
+
::: tip
56
+
You can also run the above script in your CI setup to enable automatic deployment on each push.
57
+
:::
58
+
59
59
## GitLab Pages and GitLab CI
60
60
61
-
1. Set correct `base` in `docs/.vuepress/config.js`.
61
+
1. Set correct `base` in `docs/.vuepress/config.js`.
62
62
63
63
If you are deploying to `https://<USERNAME or GROUP>.gitlab.io/`, you can omit `base` as it defaults to `"/"`.
64
64
65
65
If your are deploying to `https://<USERNAME or GROUP>.gitlab.io/<REPO>/`, (i.e. your repository is at `https://gitlab.com/<USERNAME>/REPO>`), set `base` to `"/<REPO>/"`.
66
-
66
+
67
67
2. Set `dest` in `.vuepress/config.js` to `public`.
68
68
69
-
3. Create a file called `.gitlab-ci.yml` in the root of your project with the content below. This will build and deploy your site whenever you make changes to your content.
69
+
3. Create a file called `.gitlab-ci.yml` in the root of your project with the content below. This will build and deploy your site whenever you make changes to your content.
Copy file name to clipboardExpand all lines: docs/guide/markdown.md
+4-12
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,7 @@ Inbound links ending in `.md` or `.html` are converted to `<router-link>` for SP
13
13
Each sub-directory in your static site should contain a `README.md`. It will automatically be converted to `index.html`.
14
14
15
15
::: tip
16
-
When writing the relative path to a directory's `index.html`, don't forget to close it off with a `/`, otherwise you will get a 404.
17
-
18
-
```md
19
-
<!-- You'll get a 404 -->
20
-
[About Page](/about)
21
-
22
-
<!-- This is correct -->
23
-
[About Page](/about/)
24
-
```
16
+
When writing the relative path to a directory's `index.html`, don't forget to close it off with a `/`, otherwise you will get a 404. For example, use `/config/` instead of `/config`.
25
17
:::
26
18
27
19
If you want to link to another markdown file within a directory, remember to:
@@ -56,10 +48,10 @@ Given the following directory structure:
0 commit comments