@apify/docs-theme 1.0.230 → 1.0.231
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/roa-loader/index.js +12 -1
- package/src/theme/custom.css +38 -24
package/package.json
CHANGED
package/src/roa-loader/index.js
CHANGED
|
@@ -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',
|
|
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
|
|
package/src/theme/custom.css
CHANGED
|
@@ -1785,56 +1785,70 @@ iframe[src*="youtube"] {
|
|
|
1785
1785
|
.theme-api-markdown .openapi-clients-box {
|
|
1786
1786
|
display: block;
|
|
1787
1787
|
float: right;
|
|
1788
|
-
|
|
1789
|
-
|
|
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
|
-
.
|
|
1793
|
-
|
|
1794
|
-
|
|
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
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1812
|
+
gap: 6px;
|
|
1813
|
+
padding: 2px 0;
|
|
1814
|
+
text-decoration: none;
|
|
1815
|
+
transition: opacity 0.15s ease;
|
|
1804
1816
|
}
|
|
1805
1817
|
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1818
|
+
.client-docs-link:hover {
|
|
1819
|
+
opacity: 0.8;
|
|
1820
|
+
text-decoration: none;
|
|
1809
1821
|
}
|
|
1810
1822
|
|
|
1811
|
-
.
|
|
1812
|
-
|
|
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
|
-
.
|
|
1816
|
-
|
|
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
|
}
|