-
Notifications
You must be signed in to change notification settings - Fork 1
/
docusaurus.config.js
251 lines (244 loc) · 11.9 KB
/
docusaurus.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const awsSvg =
`<svg preserveAspectRatio="none" width="30" height="20" viewBox="14.7 23 42 26.2" xmlns="http://www.w3.org/2000/svg"><polygon points="27.09 35.764 25.984 40.34 28.182 40.34 27.115 35.764" fill="#F7981F"/><path d="m16.302 40.744v0.666c0 3.311 3.579 6.66 7.991 6.66h23.533c4.412 0 7.991-3.35 7.991-6.66v-0.666c0-3.078-3.098-6.943-7.081-7.283-0.089-2.752-2.342-4.955-5.113-4.955-1.076 0-2.074 0.334-2.898 0.9-1.58-3.52-5.107-5.977-9.216-5.977-5.579 0-10.101 4.521-10.101 10.102 0 0.1 0.012 0.195 0.015 0.293-2.993 0.867-5.121 4.371-5.121 6.92zm12.699 3.055l-0.572-2.275h-2.717l-0.599 2.275h-1.547l2.639-9.283h1.898l2.444 9.283h-1.546zm9.012 0h-1.716l-1.196-6.994h-0.026l-1.183 6.994h-1.716l-1.795-9.283h1.496l1.221 7.215h0.027l1.221-7.215h1.561l1.248 7.254h0.026l1.209-7.254h1.469l-1.846 9.283zm5.433 0.181c-2.301 0-2.821-1.533-2.821-2.834v-0.221h1.482v0.234c0 1.131 0.494 1.703 1.521 1.703 0.936 0 1.403-0.664 1.403-1.354 0-0.975-0.493-1.404-1.325-1.65l-1.015-0.352c-1.353-0.52-1.937-1.221-1.937-2.547 0-1.691 1.144-2.627 2.886-2.627 2.379 0 2.626 1.482 2.626 2.443v0.209h-1.482v-0.195c0-0.846-0.377-1.34-1.3-1.34-0.637 0-1.248 0.352-1.248 1.34 0 0.793 0.403 1.195 1.392 1.572l1 0.365c1.313 0.467 1.886 1.184 1.886 2.457 1e-3 1.979-1.196 2.797-3.068 2.797z" fill="#F7981F"/><path d="m26.205 34.516l-2.639 9.283h1.547l0.599-2.275h2.717l0.572 2.275h1.547l-2.444-9.283h-1.899zm-0.221 5.824l1.105-4.576h0.025l1.066 4.576h-2.196z" fill="#fff"/><polygon points="37.181 41.77 37.154 41.77 35.906 34.516 34.346 34.516 33.125 41.73 33.098 41.73 31.877 34.516 30.381 34.516 32.176 43.799 33.892 43.799 35.074 36.805 35.101 36.805 36.297 43.799 38.013 43.799 39.858 34.516 38.39 34.516" fill="#fff"/><path d="m44.629 38.729l-1-0.365c-0.988-0.377-1.392-0.779-1.392-1.572 0-0.988 0.611-1.34 1.248-1.34 0.923 0 1.3 0.494 1.3 1.34v0.195h1.482v-0.209c0-0.961-0.247-2.443-2.626-2.443-1.742 0-2.886 0.936-2.886 2.627 0 1.326 0.584 2.027 1.937 2.547l1.015 0.352c0.832 0.246 1.325 0.676 1.325 1.65 0 0.689-0.468 1.354-1.403 1.354-1.027 0-1.521-0.572-1.521-1.703v-0.234h-1.482v0.221c0 1.301 0.521 2.834 2.821 2.834 1.872 0 3.068-0.818 3.068-2.795 0-1.276-0.573-1.993-1.886-2.459z" fill="#fff"/></svg>`;
const azureSvg =
`<svg width="20" height="20" viewBox="0 0 96 96" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="e399c19f-b68f-429d-b176-18c2117ff73c" x1="-1032.172" x2="-1059.213" y1="145.312" y2="65.426" gradientTransform="matrix(1 0 0 -1 1075 158)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#114a8b"/><stop offset="1" stop-color="#0669bc"/></linearGradient><linearGradient id="ac2a6fc2-ca48-4327-9a3c-d4dcc3256e15" x1="-1023.725" x2="-1029.98" y1="108.083" y2="105.968" gradientTransform="matrix(1 0 0 -1 1075 158)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-opacity=".3"/><stop offset=".071" stop-opacity=".2"/><stop offset=".321" stop-opacity=".1"/><stop offset=".623" stop-opacity=".05"/><stop offset="1" stop-opacity="0"/></linearGradient><linearGradient id="a7fee970-a784-4bb1-af8d-63d18e5f7db9" x1="-1027.165" x2="-997.482" y1="147.642" y2="68.561" gradientTransform="matrix(1 0 0 -1 1075 158)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#3ccbf4"/><stop offset="1" stop-color="#2892df"/></linearGradient></defs><path fill="url(#e399c19f-b68f-429d-b176-18c2117ff73c)" d="M33.338 6.544h26.038l-27.03 80.087a4.152 4.152 0 0 1-3.933 2.824H8.149a4.145 4.145 0 0 1-3.928-5.47L29.404 9.368a4.152 4.152 0 0 1 3.934-2.825z"/><path fill="#0078d4" d="M71.175 60.261h-41.29a1.911 1.911 0 0 0-1.305 3.309l26.532 24.764a4.171 4.171 0 0 0 2.846 1.121h23.38z"/><path fill="url(#ac2a6fc2-ca48-4327-9a3c-d4dcc3256e15)" d="M33.338 6.544a4.118 4.118 0 0 0-3.943 2.879L4.252 83.917a4.14 4.14 0 0 0 3.908 5.538h20.787a4.443 4.443 0 0 0 3.41-2.9l5.014-14.777 17.91 16.705a4.237 4.237 0 0 0 2.666.972H81.24L71.024 60.261l-29.781.007L59.47 6.544z"/><path fill="url(#a7fee970-a784-4bb1-af8d-63d18e5f7db9)" d="M66.595 9.364a4.145 4.145 0 0 0-3.928-2.82H33.648a4.146 4.146 0 0 1 3.928 2.82l25.184 74.62a4.146 4.146 0 0 1-3.928 5.472h29.02a4.146 4.146 0 0 0 3.927-5.472z"/></svg>`;
const TwitterSvg =
'<svg style="fill: #1DA1F2; vertical-align: middle;" width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg>';
const hacktoberfestAccouncement = `<b>🎃 Join us for <a target="_blank" rel="noopener noreferrer" href="https://github.com/stackql/stackql/issues?q=is%3Aissue+is%3Aopen+label%3Ahacktoberfest">Hacktoberfest</a>`;
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const registry = process.env.REGISTRY || 'root'
const docPath = registry === 'root' ? registry : `${registry}-docs`
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'StackQL Provider Registry Docs',
staticDirectories: ['static'],
tagline: 'Provision and Query Cloud and SaaS Resources using SQL',
url: 'https://registry.stackql.io',
baseUrl: '/',
onBrokenLinks: 'log',
onBrokenMarkdownLinks: 'log',
favicon: 'img/favicon.ico',
organizationName: 'stackql',
projectName: 'registry.stackql.io',
customFields: {
registry: process.env.REGISTRY || 'root'
},
plugins: [
'@docusaurus/plugin-ideal-image',
],
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
gtag: {
trackingID: 'G-EG08CB80QX',
anonymizeIP: true,
},
sitemap: {},
pages: {},
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
path: `docs/${docPath}`,
sidebarCollapsible: true,
editUrl: 'https://github.com/stackql/registry.stackql.io/edit/main/',
},
blog: false,
theme: {
customCss: require.resolve('./src/css/global.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// announcementBar: {
// id: 'support_us',
// content:
// `${azureSvg} Microsoft Azure and ${awsSvg} AWS providers for StackQL available now, If you like StackQL, give it a ⭐️ on GitHub`,
// backgroundColor: '#A9BCD0',
// textColor: '#1A4E82',
// isCloseable: true,
// },
announcementBar: {
id: 'support_us',
content: hacktoberfestAccouncement,
backgroundColor: '#A9BCD0',
textColor: '#1A4E82',
isCloseable: true,
},
announcementBarActive: false,
announcementBarLink: "https://github.com/stackql/stackql",
// hubspot: {
// accountId: '21220110',
// },
image: '/img/stackql-cover.png',
algolia: {
appId: 'HYO8BM1W1Y',
// apiKey: 'a67a2d399f2e604202e82f8fd284b103',
apiKey: '04cd0d2e11a44e792fb41ffb72f8b422',
indexName: 'stackql',
// Optional: see doc section below
contextualSearch: false,
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
// externalUrlRegex: 'external\\.com|domain\\.com',
// Optional: Algolia search parameters
// searchParameters: {},
//... other Algolia params
},
docs: {
sidebar: {
hideable: true,
}
},
navbar: {
logo: {
alt: 'StackQL',
href: '/home',
src: 'img/logo-original.svg',
srcDark: 'img/logo-white.svg',
},
items: [
// {
// to: '/features',
// label: 'Features',
// position: 'left',
// },
{
to: '/docs',
label: 'Docs',
position: 'left',
},
{
to: '/downloads',
label: 'Downloads',
position: 'left',
},
{
to: '/',
label: 'Providers',
position: 'left',
},
{
to: '/stackql-deploy',
label: 'stackql-deploy',
position: 'left',
},
{
type: 'dropdown',
label: 'Resources',
position: 'left',
items: [
{
href: 'https://github.com/stackql/stackql-actions-demo',
label: 'GitHub Actions',
},
{
to: '/blog',
label: 'Blog',
activeBasePath: 'blog',
},
{
to: '/cookbooks',
label: 'Cookbooks',
activeBasePath: 'cookbooks',
},
],
},
// {
// to: '/blog',
// label: 'Blog',
// position: 'left',
// },
{
href: 'https://github.com/stackql/stackql',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
},
],
},
footer: {
style: 'dark',
logo: {
alt: 'StackQL',
href: 'https://stackql.io/',
src: 'img/logo-original.svg',
srcDark: 'img/logo-white.svg',
},
links: [
{
title: 'StackQL',
items: [
{
label: 'Home',
to: '/home',
},
{
label: 'Features',
to: '/features',
},
{
label: 'Downloads',
to: '/downloads',
},
{
label: 'Contact us',
to: '/contact-us',
},
],
},
{
title: 'More',
items: [
{
label: 'Documentation',
to: '/docs',
},
{
label: 'Providers',
to: '/',
},
{
label: 'Blog',
to: '/blog',
},
],
},
],
copyright: `© ${new Date().getFullYear()} StackQL Studios`,
},
colorMode: {
// using user system preferences, instead of the hardcoded defaultMode
respectPrefersColorScheme: true,
},
prism: {
additionalLanguages: ['powershell'],
//theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: (() => {
var theme = require('prism-react-renderer/themes/nightOwl');
// Add additional rule to nightowl theme in order to change
// the color of YAML keys (to be different than values).
// There weren't many Prism themes that differentiated
// YAML keys and values. See link:
// https://github.com/FormidableLabs/prism-react-renderer/tree/master/src/themes
theme.styles.push({
types: ["atrule"],
style: {
// color chosen from the nightowl theme palette
// https://github.com/FormidableLabs/prism-react-renderer/blob/master/src/themes/nightOwl.js#L83
color: "rgb(255, 203, 139)"
}
});
return theme
})(),
},
}),
};
module.exports = config;