Skip to content

Commit d475d67

Browse files
committed
search: add OSD version labels
* OSD v4 docs are no longer maintaining the version number in the URL, versions are labeled by the search server and this change is reflected when calling the search function * The version number that is used as URL filter is no longer needed for OSD docs Signed-off-by: Jiri Fiala <[email protected]>
1 parent b55311c commit d475d67

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

_templates/_page_openshift.html.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,20 @@
191191

192192
var distros = {
193193
'openshift-origin': ['docs_origin', version],
194-
'openshift-dedicated': ['docs_dedicated', version],
194+
// specific labels are used for OSD instead of the URL filter, due to its unusual URL structure; assume v4
195+
'openshift-dedicated': ['docs_dedicated_v4'],
195196
'openshift-online': ['docs_online', version],
196197
'openshift-enterprise': ['docs_cp', version],
197198
'openshift-aro' : ['docs_aro', version],
198199
'openshift-rosa' : ['docs_rosa'],
199200
'openshift-acs' : ['docs_acs']
200201
};
201202

203+
// only OSD v3 docs have the version variable specified
204+
if (dk == "openshift-dedicated" && version == "3") {
205+
distros['openshift-dedicated'] = ['docs_dedicated_v3']
206+
}
207+
202208
distros[dk] ? hcSearchCategory.apply(null, distros[dk]) : hcSearchCategory("docs");
203209
</script>
204210

0 commit comments

Comments
 (0)