提交 d454b1cf 编写于 作者: U ULIVZ

docs(cn): add tip for built-in search (#262)

上级 a6fe10e9
......@@ -68,7 +68,7 @@ You can also run the above script in your CI setup to enable automatic deploymen
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.
```yaml
``` yaml
image: node:9.11.1
pages:
......
......@@ -255,6 +255,10 @@ module.exports = {
}
```
::: tip
内置搜索只会为页面的标题、`h2` 和 `h3` 构建搜索索引,如果你需要全文搜索,你可以使用 [Algolia 搜索](#Algolia-搜索)。
:::
### Algolia 搜索
你可以通过 `themeConfig.algolia` 选项来用 [Algolia DocSearch](https://community.algolia.com/docsearch/) 替换内置的搜索框。要启用 Algolia 搜索,你需要至少提供 `apiKey` 和 `indexName`:
......
......@@ -67,7 +67,7 @@ cd -
2.`.vuepress/config.js` 中将 `dest` 设置为 `public`
3. 在你项目的根目录下创建一个名为 `.gitlab-ci.yml` 的文件,无论何时你提交了更改,它都会帮助你自动构建和部署:
```yaml
``` yaml
image: node:9.11.1
pages:
......
......@@ -137,7 +137,7 @@ yarn add -D sass-loader node-sass
然后你就可以在 Markdown 或是组件中使用如下代码:
```vue
``` vue
<style lang="sass">
.title
font-size: 20px
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册