@apify/docs-theme 1.0.230 → 1.0.232

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/docs-theme",
3
- "version": "1.0.230",
3
+ "version": "1.0.232",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
package/src/config.js CHANGED
@@ -53,13 +53,13 @@ const themeConfig = {
53
53
  },
54
54
  {
55
55
  label: 'Client for JavaScript',
56
- href: `${absoluteUrl}/api/client/js/`, // we need a trailing slash here, we'd get redirected there anyway
56
+ href: `${absoluteUrl}/api/client/js/docs`,
57
57
  target: '_self',
58
58
  rel: 'dofollow',
59
59
  },
60
60
  {
61
61
  label: 'Client for Python',
62
- href: `${absoluteUrl}/api/client/python/`, // we need a trailing slash here, we'd get redirected there anyway
62
+ href: `${absoluteUrl}/api/client/python/docs/overview`,
63
63
  target: '_self',
64
64
  rel: 'dofollow',
65
65
  },
@@ -76,13 +76,13 @@ const themeConfig = {
76
76
  items: [
77
77
  {
78
78
  label: 'SDK for JavaScript',
79
- href: `${absoluteUrl}/sdk/js/`, // we need a trailing slash here, we'd get redirected there anyway
79
+ href: `${absoluteUrl}/sdk/js/docs/overview`,
80
80
  target: '_self',
81
81
  rel: 'dofollow',
82
82
  },
83
83
  {
84
84
  html: 'SDK for Python',
85
- href: `${absoluteUrl}/sdk/python/`, // we need a trailing slash here, we'd get redirected there anyway
85
+ href: `${absoluteUrl}/sdk/python/docs/overview`,
86
86
  target: '_self',
87
87
  rel: 'dofollow',
88
88
  },
@@ -90,7 +90,7 @@ const themeConfig = {
90
90
  },
91
91
  {
92
92
  label: 'CLI',
93
- href: `${absoluteUrl}/cli/`, // we need a trailing slash here, we'd get redirected there anyway
93
+ href: `${absoluteUrl}/cli/docs`,
94
94
  position: 'left',
95
95
  activeBasePath: 'cli',
96
96
  target: '_self',
@@ -188,13 +188,13 @@ const themeConfig = {
188
188
  },
189
189
  {
190
190
  label: 'Client for JavaScript',
191
- href: `${absoluteUrl}/api/client/js/`, // we need a trailing slash here, we'd get redirected there anyway
191
+ href: `${absoluteUrl}/api/client/js/docs`,
192
192
  target: '_self',
193
193
  rel: 'dofollow',
194
194
  },
195
195
  {
196
196
  label: 'Client for Python',
197
- href: `${absoluteUrl}/api/client/python/`, // we need a trailing slash here, we'd get redirected there anyway
197
+ href: `${absoluteUrl}/api/client/python/docs/overview`,
198
198
  target: '_self',
199
199
  rel: 'dofollow',
200
200
  },
@@ -205,13 +205,13 @@ const themeConfig = {
205
205
  items: [
206
206
  {
207
207
  label: 'SDK for JavaScript',
208
- href: `${absoluteUrl}/sdk/js/`, // we need a trailing slash here, we'd get redirected there anyway
208
+ href: `${absoluteUrl}/sdk/js/docs/overview`,
209
209
  target: '_self',
210
210
  rel: 'dofollow',
211
211
  },
212
212
  {
213
213
  label: 'SDK for Python',
214
- href: `${absoluteUrl}/sdk/python/`, // we need a trailing slash here, we'd get redirected there anyway
214
+ href: `${absoluteUrl}/sdk/python/docs/overview`,
215
215
  target: '_self',
216
216
  rel: 'dofollow',
217
217
  },
@@ -222,7 +222,7 @@ const themeConfig = {
222
222
  items: [
223
223
  {
224
224
  label: 'CLI',
225
- href: `${absoluteUrl}/cli/`, // we need a trailing slash here, we'd get redirected there anyway
225
+ href: `${absoluteUrl}/cli/docs`,
226
226
  position: 'left',
227
227
  target: '_self',
228
228
  rel: 'dofollow',
@@ -3,11 +3,13 @@ const { inspect } = require('node:util');
3
3
 
4
4
  const { urlToRequest } = require('loader-utils');
5
5
 
6
+ const SIGNING_TOKEN = process.env.APIFY_SIGNING_TOKEN;
6
7
  const signingUrl = new URL('https://api.apify.com/v2/tools/encode-and-sign');
7
- signingUrl.searchParams.set('token', process.env.APIFY_SIGNING_TOKEN);
8
+ signingUrl.searchParams.set('token', SIGNING_TOKEN || '');
8
9
  const queue = [];
9
10
  const cache = {};
10
11
  let working = false;
12
+ let warnedAboutMissingToken = false;
11
13
 
12
14
  function hash(source) {
13
15
  return createHash('sha1').update(source).digest('hex');
@@ -80,6 +82,15 @@ module.exports = async function (code) {
80
82
  return { code, hash: 'fast' };
81
83
  }
82
84
 
85
+ // Skip signing if token is not configured
86
+ if (!SIGNING_TOKEN) {
87
+ if (!warnedAboutMissingToken) {
88
+ console.warn('APIFY_SIGNING_TOKEN is not set, skipping code signing for runnable examples.');
89
+ warnedAboutMissingToken = true;
90
+ }
91
+ return { code, hash: 'unsigned' };
92
+ }
93
+
83
94
  console.log(`Signing ${urlToRequest(this.resourcePath)}...`, { working, queue: queue.length });
84
95
  const codeHash = await encodeAndSign(code);
85
96
 
@@ -1785,56 +1785,70 @@ iframe[src*="youtube"] {
1785
1785
  .theme-api-markdown .openapi-clients-box {
1786
1786
  display: block;
1787
1787
  float: right;
1788
- padding-left: 12px;
1789
- padding-right: 6px;
1788
+ margin-top: 16px;
1789
+ margin-left: 16px;
1790
+ margin-bottom: 12px;
1791
+ padding: 10px 16px;
1792
+ min-width: 140px;
1793
+ background: var(--ifm-background-surface-color);
1794
+ border: 1px solid var(--ifm-toc-border-color);
1795
+ border-radius: 8px;
1790
1796
  }
1791
1797
 
1792
- .client-docs-link img {
1793
- border: 1px solid var(--color-neutral-action-secondary);
1794
- border-radius: 8px;
1798
+ .theme-api-markdown .openapi-clients-box-heading {
1799
+ display: block;
1800
+ font-size: 11px;
1801
+ font-weight: 600;
1802
+ letter-spacing: 0.5px;
1803
+ text-transform: uppercase;
1804
+ color: var(--ifm-color-emphasis-600);
1805
+ margin-bottom: 4px;
1795
1806
  }
1796
1807
 
1797
1808
  .client-docs-link {
1798
1809
  display: flex;
1799
1810
  flex-direction: row;
1800
1811
  align-items: center;
1801
- justify-content: left;
1802
- gap: 8px;
1803
- padding: 4px 8px 8px 0px;
1812
+ gap: 6px;
1813
+ padding: 2px 0;
1814
+ text-decoration: none;
1815
+ transition: opacity 0.15s ease;
1804
1816
  }
1805
1817
 
1806
- a.client-docs-link {
1807
- font-weight: 500;
1808
- color: var(--color-neutral-text-muted);
1818
+ .client-docs-link:hover {
1819
+ opacity: 0.8;
1820
+ text-decoration: none;
1809
1821
  }
1810
1822
 
1811
- .theme-admonition {
1812
- clear: right;
1823
+ a.client-docs-link {
1824
+ font-size: 13px;
1825
+ font-weight: 500;
1826
+ color: var(--ifm-color-emphasis-800);
1813
1827
  }
1814
1828
 
1815
- .theme-api-markdown .openapi-clients-box-heading {
1816
- display: inline-block;
1817
- font-family: 'San Francisco', Helvetica, Arial, sans-serif;
1818
- color: var(--color-neutral-text-muted);
1819
- font-style: normal;
1820
- font-weight: 700;
1821
- font-size: 14px;
1822
- line-height: 20px;
1823
- text-transform: uppercase;
1824
- padding-bottom: 6px;
1829
+ .client-docs-link img {
1830
+ border-radius: 4px;
1825
1831
  }
1826
1832
 
1827
1833
  .theme-api-markdown .openapi-clients-box-icon {
1828
1834
  display: block;
1829
- padding: 2px;
1830
1835
  margin: 0 !important;
1831
1836
  }
1832
1837
 
1838
+ .theme-admonition {
1839
+ clear: right;
1840
+ }
1841
+
1833
1842
  .theme-api-markdown .openapi__method-endpoint-path,
1834
1843
  .theme-api-markdown .openapi-security__summary-header {
1835
1844
  margin-top: 0;
1836
1845
  }
1837
1846
 
1847
+ .theme-api-markdown .openapi-explorer__details-summary:before {
1848
+ width: 1.6rem;
1849
+ height: 1.6rem;
1850
+ }
1851
+
1838
1852
  .theme-api-markdown .prism-code .token-line::before {
1839
1853
  display: none !important;
1840
1854
  }