@apify/docs-theme 1.0.173 → 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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/config.js +15 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/docs-theme",
3
- "version": "1.0.173",
3
+ "version": "1.0.175",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -19,7 +19,7 @@
19
19
  "access": "public"
20
20
  },
21
21
  "dependencies": {
22
- "@apify/docs-search-modal": "^1.2.0",
22
+ "@apify/docs-search-modal": "^1.2.1",
23
23
  "@docusaurus/theme-common": "3.7.0",
24
24
  "@stackql/docusaurus-plugin-hubspot": "^1.1.0",
25
25
  "algoliasearch": "^5.19.0",
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
- const themeConfig = ({
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(`${__dirname}/roa-loader/`),
301
+ 'roa-loader': require.resolve(
302
+ `${__dirname}/roa-loader/`,
303
+ ),
298
304
  },
299
305
  },
300
306
  };