Skip to content

Commit 5f902b2

Browse files
authored
Use vuepress-plugin-meilisearch (meilisearch#317)
1 parent dd32a6d commit 5f902b2

File tree

9 files changed

+22
-302
lines changed

9 files changed

+22
-302
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
!.vuepress
22
.vuepress/dist/
3-
.vuepress/theme/components/Navbar.vue
4-
.vuepress/theme/components/MeiliSearchBox.vue

.github/workflows/gh-pages-scraping.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ jobs:
3131
PUBLISH_BRANCH: gh-pages
3232
PUBLISH_DIR: .vuepress/dist
3333

34-
run-scraper:
34+
scrap-docs:
3535
needs: build-deploy
3636
runs-on: ubuntu-18.04
3737
steps:
3838
- uses: actions/checkout@master
39-
- name: Run scraper
39+
- name: Run docs-scraper
4040
env:
4141
HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }}
4242
API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
43-
CONFIG_FILE_PATH: ${{ github.workspace }}/.vuepress/scraper/config.json
43+
CONFIG_FILE_PATH: ${{ github.workspace }}/.vuepress/docs-scraper/docs-scraper.config.json
4444
run: |
4545
docker run -t --rm \
4646
-e MEILISEARCH_HOST_URL=$HOST_URL \

.vuepress/config.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,6 @@ module.exports = {
125125
},
126126
],
127127
},
128-
meilisearch: {
129-
hostUrl: 'https://e10b17e6.getmeili.com',
130-
indexUid: 'docs',
131-
apiKey:
132-
'b4ff9313299e65ce4e259d3aa59730d2829c9a6805aa15b83cdbd63b20563155',
133-
},
134-
searchPlaceholder: 'Search as you type...',
135128
},
136129
plugins: [
137130
['check-md', { pattern: '**/*.md', strictExt: true }],
@@ -141,6 +134,16 @@ module.exports = {
141134
['vuepress-plugin-container', { type: 'note' }],
142135
[require('./config-path-checker')],
143136
[require('./custom-markdown-rules')],
137+
[
138+
'meilisearch',
139+
{
140+
hostUrl: 'https://e10b17e6.getmeili.com',
141+
apiKey:
142+
'b4ff9313299e65ce4e259d3aa59730d2829c9a6805aa15b83cdbd63b20563155',
143+
indexUid: 'docs',
144+
placeholder: 'Search as you type...',
145+
},
146+
],
144147
],
145148
head: [
146149
['meta', { charset: 'utf-8' }],

.vuepress/theme/components/MeiliSearchBox.vue

Lines changed: 0 additions & 149 deletions
This file was deleted.

.vuepress/theme/components/Navbar.vue

Lines changed: 0 additions & 136 deletions
This file was deleted.

.vuepress/theme/index.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
"license": "MIT",
3333
"dependencies": {
3434
"@popperjs/core": "^2.4.0",
35-
"docs-searchbar.js": "^1.1.5",
3635
"mermaid": "8.4.8",
3736
"vue-eslint-parser": "^7.0.0",
3837
"vuepress": "^1.4.1",
3938
"vuepress-plugin-element-tabs": "^0.2.8",
39+
"vuepress-plugin-meilisearch": "^0.10.1",
4040
"vuepress-plugin-seo": "^0.1.2",
4141
"vuepress-plugin-sitemap": "^2.3.1"
4242
},

yarn.lock

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3326,7 +3326,7 @@ dns-txt@^2.0.2:
33263326
dependencies:
33273327
buffer-indexof "^1.0.0"
33283328

3329-
docs-searchbar.js@^1.1.5:
3329+
docs-searchbar.js@^1.1:
33303330
version "1.1.5"
33313331
resolved "https://registry.yarnpkg.com/docs-searchbar.js/-/docs-searchbar.js-1.1.5.tgz#9c16ad7e2968514deb06254948cdbd1400a29cce"
33323332
integrity sha512-P9br2cGsQ8PhyaZrD9vedE3U3Jymedp5FuIkp5HABLwOEDTYgL4/Nk1vdYgpBWpASMm0XAazNNxnsE4NufJ6rQ==
@@ -9326,6 +9326,13 @@ vuepress-plugin-element-tabs@^0.2.8:
93269326
resize-observer-polyfill "^1.5.1"
93279327
sass-loader "^7.1.0"
93289328

9329+
vuepress-plugin-meilisearch@^0.10.1:
9330+
version "0.10.1"
9331+
resolved "https://registry.yarnpkg.com/vuepress-plugin-meilisearch/-/vuepress-plugin-meilisearch-0.10.1.tgz#13d1eb4f77e5d594dc4c1e5073762eba7e60f305"
9332+
integrity sha512-h/TTZ/AuBWB0sO1MhyEWoJNkq7B41O3+des6lsJJz+R644Oda/W9sRUdcG9vQ+O5BGvHH7AinLZ/y/KoY40Glw==
9333+
dependencies:
9334+
docs-searchbar.js "^1.1"
9335+
93299336
vuepress-plugin-seo@^0.1.2:
93309337
version "0.1.2"
93319338
resolved "https://registry.yarnpkg.com/vuepress-plugin-seo/-/vuepress-plugin-seo-0.1.2.tgz#132e656274bfaffce72e816fb8450951f3f6cc13"

0 commit comments

Comments
 (0)