@healthcatalyst/catalyst-docfx-template 1.0.160 → 1.0.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
package/package.json
CHANGED
package/styles/main.css
CHANGED
package/styles/main.js
CHANGED
|
@@ -174,13 +174,16 @@ function replaceTokensInNode(node, replacements) {
|
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
function getSiteRootPath() {
|
|
178
|
+
var pathSegments = window.location.pathname.split('/').filter(Boolean);
|
|
179
|
+
return pathSegments.length ? '/' + pathSegments[0] + '/' : '/';
|
|
180
|
+
}
|
|
181
|
+
|
|
177
182
|
// Replace {{ keys }} with plain-text values in sourcedContent/terms.json at directory root
|
|
178
183
|
|
|
179
184
|
var terms = (function () {
|
|
180
185
|
var json = null;
|
|
181
|
-
|
|
182
|
-
var baseHref = document.querySelector('meta[property="docfx:rel"]')?.getAttribute('content') || '../';
|
|
183
|
-
var termsPath = baseHref + "sourcedContent/terms.json";
|
|
186
|
+
var termsPath = getSiteRootPath() + "sourcedContent/terms.json";
|
|
184
187
|
$.ajax({
|
|
185
188
|
async: true,
|
|
186
189
|
global: false,
|
|
@@ -208,9 +211,7 @@ var terms = (function () {
|
|
|
208
211
|
|
|
209
212
|
var messages = (function () {
|
|
210
213
|
var json = null;
|
|
211
|
-
|
|
212
|
-
var baseHref = document.querySelector('meta[property="docfx:rel"]')?.getAttribute('content') || '../';
|
|
213
|
-
var messagesPath = baseHref + "sourcedContent/messages.json";
|
|
214
|
+
var messagesPath = getSiteRootPath() + "sourcedContent/messages.json";
|
|
214
215
|
|
|
215
216
|
$.ajax({
|
|
216
217
|
async: true,
|
|
Binary file
|