Skip to content

Commit 253c1e5

Browse files
authored
Missing platform in version picker (#278)
1 parent 714a92b commit 253c1e5

File tree

3 files changed

+110
-116
lines changed

3 files changed

+110
-116
lines changed

preview-src/ui-model.yml

Lines changed: 103 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,79 @@ site:
33
url: http://localhost:5252
44
title: Documentation Preview
55
homeUrl: &home_url /index.html
6-
# uncomment below to test analytics locally
6+
# uncomment below to test analytics locally
77
keys:
88
# googleAnalytics: 'GTM-MQ59XD6'
9-
# aiSearchId: 'ad664bf0-07e2-42e7-9150-2e1b04b15cca'
10-
# docsearchId: 'QK2EAH8GB0'
11-
# docsearchApi: 'ef7bd9485eafbd75d6e8425949eda1f5'
12-
# docsearchIndex: 'prod_hazelcast_docs'
9+
aiSearchId: 'ad664bf0-07e2-42e7-9150-2e1b04b15cca'
10+
docsearchId: 'QK2EAH8GB0'
11+
docsearchApi: 'ef7bd9485eafbd75d6e8425949eda1f5'
12+
docsearchIndex: 'prod_hazelcast_docs'
1313
# clarity: 'l8c076m4u9'
1414
components:
15-
- name: hazelcast
15+
- name: hazelcast
16+
url: '/java.html'
17+
versions:
18+
- &latest_version_hazelcast
1619
url: '/java.html'
17-
versions:
18-
- &latest_version_hazelcast
19-
url: '/java.html'
20-
title: Hazelcast Platform
21-
version: '5.5'
22-
displayVersion: '5.5'
23-
- url: '/java.html'
24-
title: Hazelcast Platform
25-
version: '4.0'
26-
displayVersion: '4.0'
27-
latest: *latest_version_hazelcast
28-
- name: clc
20+
title: Hazelcast Platform
21+
version: '5.5'
22+
displayVersion: '5.5'
23+
- url: '/java.html'
24+
title: Hazelcast Platform
25+
version: '4.0'
26+
displayVersion: '4.0'
27+
latest: *latest_version_hazelcast
28+
- name: clc
29+
url: '/how-to-hz.html'
30+
versions:
31+
- &latest_version_clc
2932
url: '/how-to-hz.html'
30-
versions:
31-
- &latest_version_clc
32-
url: '/how-to-hz.html'
33-
title: Hazelcast CLC
34-
version: '4.1'
35-
displayVersion: '4.1'
36-
- url: '/how-to-hz.html'
37-
title: Hazelcast CLC
38-
version: '4.0'
39-
displayVersion: '4.0'
40-
latest: *latest_version_clc
41-
- name: tutorials
42-
url: '/tutorials.html'
43-
versions:
44-
- &latest_version_tutorials
45-
title: Tutorials
46-
url: '/tutorials.html'
47-
version: 'default'
48-
displayVersion: 'default'
49-
latest: *latest_version_tutorials
50-
- name: management-center
51-
url: '/java.html'
52-
versions:
53-
- &latest_version_mc
54-
title: Management Center
55-
url: '/java.html'
56-
version: '5.9-SNAPSHOT'
57-
displayVersion: '5.9-SNAPSHOT'
58-
- url: '/java.html'
59-
title: Management Center
60-
version: '5.5'
61-
displayVersion: '5.5'
62-
latest: *latest_version_mc
63-
- name: home
33+
title: Hazelcast CLC
34+
version: '4.1'
35+
displayVersion: '4.1'
36+
- url: '/how-to-hz.html'
37+
title: Hazelcast CLC
38+
version: '4.0'
39+
displayVersion: '4.0'
40+
latest: *latest_version_clc
41+
- name: tutorials
42+
url: '/tutorials.html'
43+
versions:
44+
- &latest_version_tutorials
45+
title: Tutorials
46+
url: '/tutorials.html'
47+
version: 'default'
48+
displayVersion: 'default'
49+
latest: *latest_version_tutorials
50+
- name: management-center
51+
url: '/java.html'
52+
versions:
53+
- &latest_version_mc
54+
title: Management Center
55+
url: '/java.html'
56+
version: '5.9-SNAPSHOT'
57+
displayVersion: '5.9-SNAPSHOT'
58+
- url: '/java.html'
59+
title: Management Center
60+
version: '5.5'
61+
displayVersion: '5.5'
62+
latest: *latest_version_mc
63+
- name: home
64+
url: /index.html
65+
versions:
66+
- &latest_version_home
67+
title: Home
6468
url: /index.html
65-
versions:
66-
- &latest_version_home
67-
title: Home
68-
url: /index.html
69-
version: '4.1'
70-
displayVersion: '4.1'
71-
latest: *latest_version_home
69+
version: '4.1'
70+
displayVersion: '4.1'
71+
latest: *latest_version_home
7272
page:
7373
url: *home_url
7474
home: true
7575
title: Java Client
7676
attributes:
7777
component-order: '!home, !templates, !imdg, !privacy, hazelcast, management-center, cloud, *'
78-
excluded-versions: 'management-center:5.5'
78+
excluded-versions: 'hazelcast:4.0'
7979
last-versions-count: 10
8080
component:
8181
name: management-center
@@ -97,51 +97,51 @@ page:
9797
url: '#'
9898
urlType: 'internal'
9999
breadcrumbs:
100-
- content: Hazelcast Clients
101-
url: '#'
102-
urlType: fragment
103-
- content: Java Client
104-
url: /java.html
105-
urlType: internal
100+
- content: Hazelcast Clients
101+
url: '#'
102+
urlType: fragment
103+
- content: Java Client
104+
url: /java.html
105+
urlType: internal
106106
versions:
107-
- version: '4.1'
108-
displayVersion: '4.1'
109-
url: '#'
110-
- version: '4.0'
111-
displayVersion: '4.0'
112-
url: '#'
107+
- version: '4.1'
108+
displayVersion: '4.1'
109+
url: '#'
110+
- version: '4.0'
111+
displayVersion: '4.0'
112+
url: '#'
113113
navigation:
114-
- root: true
115-
- content: Quickstart
116-
url: '#1'
114+
- root: true
115+
- content: Quickstart
116+
url: '#1'
117+
urlType: internal
118+
items:
119+
- content: Java Client
120+
url: '/java.html'
121+
urlType: internal
122+
- content: C++ Client
123+
url: '#3'
124+
urlType: internal
125+
- content: How to HZ
126+
url: '/how-to-hz.html#4'
127+
urlType: internal
128+
- content: Hazelcast Clients
129+
url: '#2'
130+
urlType: internal
131+
items:
132+
- content: Java Client
133+
url: '/java.html'
117134
urlType: internal
118-
items:
119-
- content: Java Client
120-
url: '/java.html'
121-
urlType: internal
122-
- content: C++ Client
123-
url: '#3'
124-
urlType: internal
125-
- content: How to HZ
126-
url: '/how-to-hz.html#4'
127-
urlType: internal
128-
- content: Hazelcast Clients
129-
url: '#2'
135+
- content: C++ Client
136+
url: '#3'
130137
urlType: internal
138+
- content: Hazelcast Deep Client. Pretty long
139+
url: '#4'
140+
urlType: fragment
131141
items:
132-
- content: Java Client
133-
url: '/java.html'
134-
urlType: internal
135-
- content: C++ Client
136-
url: '#3'
137-
urlType: internal
138-
- content: Hazelcast Deep Client. Pretty long
139-
url: '#4'
140-
urlType: fragment
141-
items:
142-
- content: Java Client 2
143-
url: '/java2.html'
144-
urlType: internal
145-
- content: C++ Client
146-
url: '#5'
147-
urlType: internal
142+
- content: Java Client 2
143+
url: '/java2.html'
144+
urlType: internal
145+
- content: C++ Client
146+
url: '#5'
147+
urlType: internal

src/helpers/sort-components.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const excludeComponentVersions = (targetCollection, page) => {
55
if (page.attributes['excluded-versions']) {
66
const excludedComponentVersions = page.attributes['excluded-versions']
77
.split(',').map((it) => it.trim())
8-
console.debug('[DEBUG:SORT_COMPONENTS] excluding versions: ', excludedComponentVersions)
8+
// console.debug('[DEBUG:SORT_COMPONENTS] excluding versions: ', excludedComponentVersions)
99
excludedComponentVersions.forEach((componentVersion, index) => {
1010
const [componentName, versionName] = componentVersion.split(':')
1111
const component = targetCollection.find(({ name }) => name === componentName)
@@ -21,7 +21,6 @@ const excludeComponentVersions = (targetCollection, page) => {
2121
}
2222
})
2323
}
24-
console.log(targetCollection.find(({ name }) => name === 'management-center'))
2524
return targetCollection
2625
}
2726

@@ -46,5 +45,6 @@ module.exports = (collection, property, orderSpec, { data: { root } }) => {
4645
}, [])
4746
if (~restIdx) targetCollection.splice(restIdx, 0, ...sourceCollection.values())
4847
targetCollection = excludeComponentVersions(targetCollection, root.page)
48+
// console.debug('[DEBUG:SORT_COMPONENTS] targetCollection: ', targetCollection)
4949
return targetCollection
5050
}

src/partials/nav-explore.hbs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,11 @@
1515

1616
<ul class="nav-version-picker-components" id="navbarProductsList">
1717
{{#each (sort-components site.components 'name' page.attributes.component-order)}}
18-
{{#if (and (not-eq this.name 'home') (not-eq this.name 'templates') (not-eq this.name 'imdg') (not-eq this.name 'jdbc-driver') (not-eq this.name 'privacy'))}}
19-
<li class="component{{#if (eq this @root.page.component)}} is-current{{/if}}">
20-
{{#each ./versions}}
21-
{{#if (eq this ../latest)}}
22-
<a href="{{{relativize ./url}}}">
23-
{{{../title}}}
24-
</a>
25-
{{/if}}
26-
{{/each}}
27-
</li>
28-
{{/if}}
18+
<li class="component{{#if (eq this @root.page.component)}} is-current{{/if}}">
19+
<a href="{{{relativize ./latest.url}}}">
20+
{{{./latest.title}}}
21+
</a>
22+
</li>
2923
{{/each}}
3024
</ul>
3125

0 commit comments

Comments
 (0)