@apify/docs-theme 1.0.174 → 1.0.175
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.
- package/package.json +1 -1
- package/src/config.js +15 -9
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/* eslint-disable global-require */
|
|
2
|
-
// eslint-disable-next-line no-nested-ternary
|
|
3
|
-
const absoluteUrl = process.env.LOCALHOST
|
|
4
|
-
? 'http://localhost:3000'
|
|
5
|
-
: process.env.DEV
|
|
6
|
-
? 'http://docs.apify.loc'
|
|
7
|
-
: 'https://docs.apify.com';
|
|
8
2
|
|
|
9
|
-
|
|
3
|
+
let absoluteUrl = 'https://docs.apify.com';
|
|
4
|
+
|
|
5
|
+
if (process.env.LOCALHOST) {
|
|
6
|
+
absoluteUrl = 'http://localhost:3000';
|
|
7
|
+
} else if (process.env.DEV) {
|
|
8
|
+
absoluteUrl = 'http://docs.apify.loc';
|
|
9
|
+
} else if (process.env.APIFY_DOCS_ABSOLUTE_URL) {
|
|
10
|
+
absoluteUrl = process.env.APIFY_DOCS_ABSOLUTE_URL;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const themeConfig = {
|
|
10
14
|
docs: {
|
|
11
15
|
versionPersistence: 'localStorage',
|
|
12
16
|
sidebar: {
|
|
@@ -277,7 +281,7 @@ const themeConfig = ({
|
|
|
277
281
|
async: true,
|
|
278
282
|
defer: true,
|
|
279
283
|
},
|
|
280
|
-
}
|
|
284
|
+
};
|
|
281
285
|
|
|
282
286
|
const plugins = [
|
|
283
287
|
[
|
|
@@ -294,7 +298,9 @@ const plugins = [
|
|
|
294
298
|
return {
|
|
295
299
|
resolveLoader: {
|
|
296
300
|
alias: {
|
|
297
|
-
'roa-loader': require.resolve(
|
|
301
|
+
'roa-loader': require.resolve(
|
|
302
|
+
`${__dirname}/roa-loader/`,
|
|
303
|
+
),
|
|
298
304
|
},
|
|
299
305
|
},
|
|
300
306
|
};
|