Skip to content

Commit 3a89cef

Browse files
committed
📝 Add Elastic branding to the README
Change Plugin icon
1 parent ad90e36 commit 3a89cef

File tree

6 files changed

+98
-52
lines changed

6 files changed

+98
-52
lines changed

README.md

+48-25
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,41 @@
22

33
Bring the power of Elasticsearch to you Craft 3 CMS project
44

5-
![Screenshot](resources/img/plugin-logo.png)
6-
75
## Requirements
86

97
This plugin requires **Craft CMS 3.0.0-RC1** or later.
108

11-
In order to index data, you will need an **Elasticsearch instance 6.0** or later with the Ingest attachment processor plugin activated.
9+
In order to index data, you will need an **Elasticsearch instance 6.0** or
10+
later with the Ingest attachment processor plugin activated.
1211

13-
### Installation
1412

15-
- Install with Composer from your project directory
16-
```
17-
composer require la-hautes-societe/craft-elasticsearch
18-
```
13+
### Installation
1914

20-
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Elasticsearch.
15+
- Install with Composer from your project directory:
16+
`composer require la-hautes-societe/craft-elasticsearch`
17+
- In the Control Panel, go to Settings → Plugins and click the “Install”
18+
button for Elasticsearch.
19+
2120

2221
## Elasticsearch plugin Overview
2322

2423
Elasticsearch plugin will automatically index each entries on your site(s).
2524

26-
It will figure out the best Elasticsearch mapping for you based on your site(s) language.
25+
It will figure out the best Elasticsearch mapping for you based on your site(s)
26+
language.
27+
2728

2829
## Configuring Elasticsearch plugin
2930

30-
Go to the plugin settings and adjust the host name and port for your Elasticsearch instance.
31+
Go to the plugin settings and adjust the host name and port for your
32+
Elasticsearch instance.
3133

32-
If your instance is protected with X-Pack Security, you can provide your username and passwords as well.
34+
If your instance is protected with X-Pack Security, you can provide your
35+
username and passwords as well.
36+
37+
Optionally, in the `config` folder, you can override the following plugin
38+
configurations by adding a `elacticsearch.php` file as follow:
3339

34-
Optionally, in the `config` folder, you can override the following plugin configurations by adding a `elacticsearch.php` file as follow:
3540
```php
3641
<?php
3742
return [
@@ -43,13 +48,20 @@ return [
4348
];
4449
```
4550

46-
- `content_pattern`: the regular expression used to extract the relevant content of the page to be indexed
47-
- `highlight`: the elasticsearch configuration used to highlight query results. For more options, refer to the [elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/search-request-highlighting.html)
51+
- `content_pattern`: the regular expression used to extract the relevant
52+
content of the page to be indexed
53+
- `highlight`: the elasticsearch configuration used to highlight query
54+
results. For more options, refer to the [elasticsearch documentation][]
55+
56+
[elasticsearch documentation]: https://www.elastic.co/guide/en/elasticsearch/reference/6.x/search-request-highlighting.html
4857

49-
## Using Elasticsearch plugin
5058

51-
You can enable the search feature in your frontend templates by calling the `craft.elasticsearch.results('Something to search')` variable.
52-
For instance, in a template `search/index.twig`, you could could use it like this:
59+
## Using the Elasticsearch plugin
60+
61+
You can enable the search feature in your frontend templates by calling the
62+
`craft.elasticsearch.results('Something to search')` variable.
63+
For instance, in a template `search/index.twig`, you could could use it like
64+
this:
5365

5466
```twig
5567
{% set results = craft.elasticsearch.results(craft.app.request.get('q')) %}
@@ -94,20 +106,31 @@ For instance, in a template `search/index.twig`, you could could use it like thi
94106
```
95107

96108
Each entry consists of the following attributes:
97-
* `id`: Unique ID of the result
98-
* `title`: The page title
99-
* `url`: The full url of the page
100-
* `score`: The result score for the entry
101-
* `highlights`: An array of highlighted contents based on the found terms from the query
109+
- `id`: Unique ID of the result
110+
- `title`: The page title
111+
- `url`: The full url of the page
112+
- `score`: The result score for the entry
113+
- `highlights`: An array of highlighted contents based on the found terms
114+
from the query
115+
102116

103117
## Elasticsearch plugin utilities
104118

105-
If your Elasticsearch index becomes out of sync with your sites contents, you can go to Utilities → Elasticsearch then click the "Reindex all" button.
119+
If your Elasticsearch index becomes out of sync with your sites contents, you
120+
can go to Utilities → Elasticsearch then click the "Reindex all" button.
121+
106122

107123
## Elasticsearch plugin Roadmap
108124

109125
* Handle dependencies update
110126
* Handle multi-sites configurations
111127
* Detect need for re-indexation
112128

113-
Brought to you by ![LHS Logo](resources/img/lhs.png) [La Haute Société](https://www.lahautesociete.com)
129+
Brought to you by [![LHS Logo](resources/img/lhs.png) La Haute Société][lhs-site].
130+
131+
[![Elastic](resources/img/elasticsearch-logo.png)](elastic-site)
132+
Elasticsearch is a trademark of Elasticsearch BV, registered in the U.S. and in
133+
other countries.
134+
135+
[lhs-site]: https://www.lahautesociete.com
136+
[elastic-site]: https://www.elastic.co/brand

resources/img/elastic-logo.png

3.84 KB
Loading

resources/img/elasticsearch-logo.png

3.13 KB
Loading

resources/img/plugin-logo.png

-10.8 KB
Binary file not shown.

src/icon-mask.svg

+17-15
Loading

src/icon.svg

+33-12
Loading

0 commit comments

Comments
 (0)