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: CONTRIBUTING.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,14 +60,17 @@ If you already have a running Strapi app in local, testing is possible with the
60
60
yarn cy:open
61
61
```
62
62
63
-
### Playgrounds
63
+
### Run Playground
64
64
65
65
To test directly your changes on the plugin in Strapi, you can run the Strapi playground:
66
66
67
67
```bash
68
+
# Root of repository
68
69
yarn playground:dev
69
70
```
70
71
72
+
This command will install required dependencies and launch the app in development mode. You should be able to reach it on the [port 8000 of your localhost](http://localhost:8000/admin/).
Copy file name to clipboardExpand all lines: README.md
+53-18Lines changed: 53 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,10 +32,10 @@ Add your Strapi collections into a MeiliSearch instance. The plugin listens to m
32
32
-[📖 Documentation](#-documentation)
33
33
-[🔧 Installation](#-installation)
34
34
-[🎬 Getting Started](#-getting-started)
35
-
-[🤖 Compatibility with MeiliSearch](#-compatibility-with-meilisearch)
35
+
-[🤖 Compatibility with MeiliSearch and Strapi](#-compatibility-with-meilisearch)
36
36
-[💡 Learn More](#-learn-more)
37
37
-[⚙️ Development Workflow and Contributing](#️-development-workflow-and-contributing)
38
-
-[✋ Requirements](#-requirements)
38
+
-[🌎 Community support](#️-community-support)
39
39
40
40
## 📖 Documentation
41
41
@@ -61,7 +61,7 @@ To apply the plugin to Strapi, a re-build is needed:
61
61
strapi build
62
62
```
63
63
64
-
You will need both a running Strapi app and a running MeiliSearch instance. For [specific version requirements see this section](#-requirements).
64
+
You will need both a running Strapi app and a running MeiliSearch instance. For [specific version compatibiliy see this section](#-compatibility-with-meilisearch).
65
65
66
66
### 🏃♀️ Run MeiliSearch
67
67
@@ -97,7 +97,10 @@ First, add your MeiliSearch credentials in the upper box of the MeiliSearch plug
97
97
98
98
For example, using the credentials used in the [above section](#-run-meilisearch) it looks like this:
99
99
100
-

100
+
101
+
<palign="center">
102
+
<imgsrc="./assets/credentials.png"alt="Add your credentials"width="600"/>
103
+
</p>
101
104
102
105
Once completed, click on the `add` button.
103
106
@@ -110,12 +113,49 @@ We will use, as **example**, the collections provided by Strapi's quickstart.
110
113
111
114
On your plugin homepage you should have two collections appearing: `restaurant` and `category`.
112
115
113
-

116
+
<palign="center">
117
+
<imgsrc="./assets/collections_indexed.png"alt="Indexed collections need a reload"width="600"/>
118
+
</p>
114
119
115
120
By clicking on the left checkbox, the collection will be automatically indexed in MeiliSearch. For example, if you click on the `restaurant` checkbox, all your restaurants are now available in MeiliSearch.
116
121
117
122
You can check it using
118
123
124
+
### 🪝 Apply Hooks
125
+
126
+
Hooks are listeners that update MeiliSearch each time you add/update/delete an entry in your collections.
127
+
In order to activate them you will have to reload the server. This is possible by clicking on the `Reload Server` button if you are in auto-reload mode, or by manually reloading the server mode.
128
+
129
+
130
+
<palign="center">
131
+
<imgsrc="./assets/no_reload_needed.png"alt="Indexed collections are hooked"width="600"/>
132
+
</p>
133
+
134
+
135
+
### 🕵️♀️ Start Searching
136
+
137
+
Once you have a collection containing documents indexed in MeiliSearch, you can [start searching](https://docs.meilisearch.com/learn/getting_started/quick_start.html#search).
138
+
139
+
Using the above credentials the following code shows how to search on one of your collections:
140
+
141
+
```javascript
142
+
import { MeiliSearch } from'meilisearch'
143
+
144
+
;(async () => {
145
+
constclient=newMeiliSearch({
146
+
host:'http://127.0.0.1:7700',
147
+
apiKey:'masterKey',
148
+
})
149
+
150
+
// An index is where the documents are stored.
151
+
constindex=client.index('movies').search('')
152
+
})()
153
+
```
154
+
155
+
## 💡 Learn More
156
+
157
+
If you don't have a running Strapi app, you can still try this plugin using either of one of the following options:
158
+
119
159
### Run Playground
120
160
121
161
Instead of adding the plugin to an existing project, you can try it out using the playground in this project.
@@ -168,7 +208,8 @@ yarn develop
168
208
169
209
You can now use the plugin on your Strapi project.
170
210
171
-
## 🖐 Requirements
211
+
212
+
## 🤖 Compatibility with MeiliSearch and Strapi
172
213
173
214
Complete installation requirements are exact same as for Strapi itself and can be found in the documentation under [Installation Requirements](https://strapi.io/documentation/v3.x/installation/cli.html#step-1-make-sure-requirements-are-met).
174
215
@@ -185,20 +226,14 @@ Complete installation requirements are exact same as for Strapi itself and can b
185
226
186
227
**We recommend always using the latest version of Strapi to start your new projects**.
187
228
188
-
## 🌎 Community support
189
229
190
-
- For general help using Strapi, please refer to [the official Strapi documentation](https://strapi.io/documentation/).
We want to create a plugin that provides automatic actions and an interface on the Strapi dashboard that helps the user start with MeiliSearch. The User should be able to create or remove new collections from MeiliSearch.
230
+
## ⚙️ Development Workflow and Contributing
196
231
197
-
In the background, the plugin should re-index the documents that have been changed in the collections.<br>
198
-
For example, If I change the name of the restaurant `Tonio` with `Tony` in a Strapi collection, an update should automatically be done to update it as well on MeiliSearch.
232
+
Any new contribution is more than welcome in this project!
199
233
200
-
No additional routes should be created on strapi for the front end users as they will be using the MeiliSearch API to search and not Strapi (unless we want to make this possible?).
234
+
If you want to know more about the development workflow or want to contribute, please visit our [contributing guidelines](/CONTRIBUTING.md) for detailed instructions!
201
235
202
-
## MVP
236
+
## 🌎 Community support
203
237
204
-
[You can follow allong the progression of this project here](https://github.com/meilisearch/strapi-plugin-meilisearch/issues).
238
+
- For general help using Strapi, please refer to [the official Strapi documentation](https://strapi.io/documentation/).
0 commit comments