We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d46894d + cb8328b commit 10220caCopy full SHA for 10220ca
_javascripts/page-loader.js
@@ -41,7 +41,17 @@ function versionSelector(list) {
41
if (dk === "openshift-origin") {
42
currentVersion = window.location.pathname.split("/")[1];
43
} else {
44
- currentVersion = window.location.pathname.split("/")[2];
+ const path = window.location.pathname;
45
+ const pathParts = path.split('/').filter(part => part.length > 0);
46
+
47
+ // Check if we're in the openshift-docs subdirectory for github pages
48
+ if (pathParts.length > 0 && pathParts[0] === 'openshift-docs') {
49
+ currentVersion = pathParts[2];
50
+ } else {
51
+ // If not in the openshift-docs subdirectory
52
+ currentVersion = pathParts[1];
53
+ }
54
55
}
56
57
// Get the correct URL path from the urlMappings and prepend the base URL
0 commit comments