Skip to content

Commit 464038e

Browse files
authored
Fix search page (#380)
* instantsearch.js: Fix instantsearch credentials and index name * instantsearch.js: Fix initialUiState * instantsearch.js: Fix version parsing and default version * instantsearch.css: Fix spacing in result item CSS
1 parent eff6441 commit 464038e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

docs/css/instantsearch.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ footer.md-footer {
8080
line-height: 20px;
8181
letter-spacing: 0.12px;
8282
margin: 4px 0;
83+
display: block;
84+
text-align: left;
8385
}
8486

8587
.md-content .ais-InstantSearch .instantsearch__entry-header .ais-Highlight-highlighted {

docs/js/instantsearch.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
const parsed_search_query = decodeURI(search_query.replaceAll('+', ' '));
55
const search_page = (match = doc.location.search.match(/p=(\d*?)(&|$)/)) ? match[1] : 1;
66
const parsed_search_page = parseInt(search_page);
7-
let version = doc.location.pathname.split('/')[2];
7+
let version = doc.location.pathname.split('/')[4];
88
if (!/^\d+\.\d+$/.test(version) && version !== 'latest') {
9-
version = 'master';
9+
version = 'latest';
1010
}
1111
const hitsContainer = '#hits';
1212
const statsContainer = '#stats';
1313
const paginationContainer = '#pagination';
1414
const search = instantsearch({
15-
indexName: 'ezplatform',
16-
searchClient: algoliasearch('2DNYOU6YJZ', '21ce3e522455e18e7ee16cf7d66edb4b'),
15+
indexName: 'ezplatform_userguide',
16+
searchClient: algoliasearch('WLX2XJZTRM', '40ac288790bce56f11de4f1fb8e8ded4'),
1717
initialUiState: {
18-
ezplatform: {
18+
ezplatform_userguide: {
1919
query: parsed_search_query,
2020
refinementList: { version: [version] },
2121
page: parsed_search_page,

0 commit comments

Comments
 (0)