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.
1 parent c01c251 commit f676773Copy full SHA for f676773
_javascripts/page-loader.js
@@ -5,8 +5,15 @@ let fileRequested = "";
5
6
// Get the base URL dynamically
7
function getBaseUrl() {
8
+ const path = window.location.pathname;
9
+ const pathParts = path.split('/').filter(part => part.length > 0);
10
- // Fallback to current origin
11
+ // Check if we're in the openshift-docs subdirectory for github pages
12
+ if (pathParts.length > 0 && pathParts[0] === 'openshift-docs') {
13
+ return `${window.location.protocol}//${window.location.host}/openshift-docs/`;
14
+ }
15
+
16
+ // If not in the openshift-docs subdirectory, use the root
17
return `${window.location.protocol}//${window.location.host}/`;
18
}
19
0 commit comments