mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
search: OKD4 version and URL workaround
* Avoids the current OKD 4 docs and URL discrepancy where the version is set to 4, but the URL contains the "latest" string instead that filters all results with the URL string "/4/" that is never present. * If future "latest" versions would be represented by other version values, this needs to be adjusted accordingly. * Closes #28979 Signed-off-by: Jiri Fiala <jfiala@redhat.com>
This commit is contained in:
committed by
openshift-cherrypick-robot
parent
26adddf0c2
commit
df2973a3c1
@@ -27,6 +27,8 @@ function hcSearchCategory(label, version) {
|
||||
label: label,
|
||||
urlFilter: (typeof version === "undefined" || version == "Branch Build") ? "" : (" url:*\\/" + version + "\\/*")
|
||||
};
|
||||
// work around the current OKD-specific version=4 and URL discrepancy
|
||||
if (window.location.href.includes("docs.okd.io/latest/") && version == 4) searchParams.urlFilter = " url:*\\/latest\\/*"
|
||||
modalSearch.show();
|
||||
hcsearch(searchParams);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user