Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 0b93202

Browse files
francoischalifourbobylito
authored andcommitted
feat(cli): Accept multiple attributes to display (#153)
* feat(cli): Accept multiple attributes to display BREAKING CHANGE: The option `mainAttribute` has been renamed `attributesToDisplay` and now accepts multiple attributes. Closes #151 * docs(readme): Document `attributesToDisplay` * test(e2e): Update tests with `attributesToDisplay` * build(release): Update release-template script with `attributesToDisplay` * feat(templates): Update templates with `attributesToDisplay` * test(snapshots): Update template snapshots * fix(template): Remove unused CSS imports
1 parent c9cdb13 commit 0b93202

File tree

26 files changed

+359
-173
lines changed

26 files changed

+359
-173
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ $ create-instantsearch-app --help
6868
--app-id <appId> The application ID
6969
--api-key <apiKey> The Algolia search API key
7070
--index-name <indexName> The main index of your search
71-
--main-attribute <mainAttribute> The main searchable attribute of your index
71+
--attributes-to-display <attributesToDisplay> The attributes of your index to display
7272
--attributes-for-faceting <attributesForFaceting> The attributes for faceting
7373
--template <template> The InstantSearch template to use
7474
--library-version <libraryVersion> The version of the library
@@ -110,7 +110,7 @@ The `config` flag is handy to automate app generations.
110110
"apiKey": "MY_API_KEY",
111111
"indexName": "MY_INDEX_NAME",
112112
"searchPlaceholder": "Search",
113-
"mainAttribute": "name",
113+
"attributesToDisplay": ["name", "description"],
114114
"attributesForFaceting": ["brand", "location"]
115115
}
116116
```
@@ -131,7 +131,7 @@ const createInstantSearchApp = require('create-instantsearch-app');
131131
const app = createInstantSearchApp('~/lab/my-app', {
132132
template: 'InstantSearch.js',
133133
libraryVersion: '2.0.0',
134-
mainAttribute: 'name',
134+
attributesToDisplay: ['name', 'description'],
135135
attributesForFaceting: ['keywords'],
136136
});
137137

0 commit comments

Comments
 (0)