forked from dfinity/portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
233 lines (221 loc) · 16.4 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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
// @ts-ignore
const versions = require('./versions.json');
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const isDev = process.env.NODE_ENV === 'development';
const isDeployPreview =
!!process.env.NETLIFY && process.env.CONTEXT === 'deploy-preview';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Internet Computer Developer Centre',
tagline: 'If you’ve landed here, you’re interested in learning more about the Internet Computer. You’re in the right place — take a look below for where to get started!',
url: 'https://smartcontracts.org',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
favicon: 'img/favicon-32x32.png',
organizationName: 'dfinity',
projectName: 'portal',
plugins: [
require.resolve('docusaurus-lunr-search'),
[
"docusaurus2-dotenv",
{systemvars: true},
],
[
'@docusaurus/plugin-content-docs',
({
id: 'samples',
path: 'samples',
routeBasePath: 'samples',
sidebarPath: require.resolve('./sidebarsSample.js'),
}),
],
],
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
lastVersion: versions[0],
showLastUpdateAuthor: true,
showLastUpdateTime: true,
breadcrumbs: true,
versions: {
current: {
label: "Current 🚧",
path: 'current'
}
},
sidebarPath: require.resolve('./sidebars.js'),
// TODO: Please change this to your repo.
editUrl: 'https://github.com/dfinity/portal/edit/master/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
// TODO: Remove when ready to integrate internationalization
// i18n: {
// defaultLocale: 'en',
// locales: isDeployPreview
// ? // Deploy preview: keep it fast!
// ['en']
// : ['en', 'fr'],
// },
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: '/img/share.jpg',
navbar: {
hideOnScroll: true,
logo: {
alt: 'DFINITY Logo',
src: 'img/IC_logo_horizontal.svg',
srcDark: 'img/IC_logo_horizontal_white.svg',
},
items: [
{
type: 'docSidebar',
position: 'left',
sidebarId: 'developer-docs',
label: 'Developer Docs',
},
{
type: 'docSidebar',
position: 'left',
sidebarId: 'references',
label: 'References',
},
{
type: 'docSidebar',
position: 'left',
sidebarId: 'concepts',
label: 'Concepts',
},
{
type: 'docSidebar',
position: 'left',
sidebarId: 'tokenomics',
label: 'Tokenomics',
},
{
type: 'search',
position: 'right',
},
{
to: '/docs/current/developer-docs/ic-overview',
label: 'Docs',
position: 'right',
},
{
to: '/samples',
label: 'Sample Code',
position: 'right',
},
{
to: 'https://www.ic.community/',
label: 'ic.community',
position: 'right',
},
//{
// type: 'docsVersionDropdown',
// position: 'right',
// dropdownActiveClassDisabled: true,
//},
// TODO: remove when integrating i18n
// {
// type: 'localeDropdown',
// position: 'right',
// },
],
},
announcementBar: isDev || isDeployPreview ? {
id: 'local_dev',
content:
isDeployPreview ? `You are currently viewing a preview of this <a href="${process.env.PR_URL || 'https://github.com/dfinity/portal'}">Pull Request</a>.` :
'You are currently locally editing the Developer Portal. Contributing guidelines are available <a href="https://github.com/dfinity/portal#contributing">here</a>.',
textColor: '#091E42',
isCloseable: false,
} : undefined,
footer: {
links: [
{
items: [
{
label: 'DFINITY Foundation',
to: 'https://dfinity.org/',
},
{
label: 'Internet Computer Association',
to: 'https://internetcomputer.org/',
},
],
},
{
items: [
{
label: '"Powered by Crypto" Assets',
to: 'https://dfinity.frontify.com/d/XzkdhhDptijE/dfinity-brand-guide#/internet-computer/powered-by-crypto-badges'
},
{
label: 'Support & Feedback',
to: 'https://support.dfinity.org/hc/en-us'
},
]
},
{
title: 'SocialMedia',
items: [
{
label: 'Youtube',
to: 'https://www.youtube.com/dfinity',
icon: 'data:image/svg+xml,%3C%3Fxml version=\'1.0\' encoding=\'iso-8859-1\'%3F%3E%3C!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version=\'1.1\' id=\'Layer_1\' xmlns=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\' x=\'0px\' y=\'0px\' width=\'24\' height=\'24\' viewBox=\'0 0 310 310\' style=\'enable-background:new 0 0 310 310;\' xml:space=\'preserve\'%3E%3Cg id=\'XMLID_822_\'%3E%3Cpath id=\'XMLID_823_\' fill=\'white\' d=\'M297.917,64.645c-11.19-13.302-31.85-18.728-71.306-18.728H83.386c-40.359,0-61.369,5.776-72.517,19.938 C0,79.663,0,100.008,0,128.166v53.669c0,54.551,12.896,82.248,83.386,82.248h143.226c34.216,0,53.176-4.788,65.442-16.527 C304.633,235.518,310,215.863,310,181.835v-53.669C310,98.471,309.159,78.006,297.917,64.645z M199.021,162.41l-65.038,33.991 c-1.454,0.76-3.044,1.137-4.632,1.137c-1.798,0-3.592-0.484-5.181-1.446c-2.992-1.813-4.819-5.056-4.819-8.554v-67.764 c0-3.492,1.822-6.732,4.808-8.546c2.987-1.814,6.702-1.938,9.801-0.328l65.038,33.772c3.309,1.718,5.387,5.134,5.392,8.861 C204.394,157.263,202.325,160.684,199.021,162.41z\'/%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3C/svg%3E%0A',
},
{
label: 'Medium',
to: 'https://medium.com/dfinity-network-blog',
icon: 'data:image/svg+xml,%3Csvg width=\'24px\' height=\'24px\' viewBox=\'0 0 24 24\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath fill=\'white\' d=\'m24 24h-24v-24h24zm-8.986-15.006v7.326c0 .198 0 .234-.127.362l-1.302 1.264v.27h6.32v-.27l-1.257-1.234c-.091-.07-.148-.178-.148-.3 0-.022.002-.043.005-.064v.002-9.07c-.003-.019-.005-.04-.005-.062 0-.121.058-.229.148-.298l.001-.001 1.286-1.234v-.27h-4.456l-3.176 7.924-3.609-7.924h-4.675v.271l1.502 1.813c.127.115.207.281.207.466 0 .022-.001.043-.003.064v-.003 7.126c.007.041.011.088.011.136 0 .222-.088.423-.231.571l-1.69 2.054v.27h4.8v-.27l-1.691-2.054c-.149-.154-.241-.363-.241-.595 0-.04.003-.079.008-.117v.004-6.16l4.215 9.195h.49z\'/%3E%3C/svg%3E',
},
{
label: 'Reddit',
to: 'https://www.reddit.com/r/dfinity/',
icon: 'data:image/svg+xml,%3Csvg width=\'24px\' height=\'24px\' viewBox=\'0 0 24 24\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cg%3E%3Cpath fill=\'none\' d=\'M0 0h24v24H0z\'/%3E%3Cpath fill-rule=\'nonzero\' fill=\'white\' d=\'M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm6.67-10a1.46 1.46 0 0 0-2.47-1 7.12 7.12 0 0 0-3.85-1.23L13 6.65l2.14.45a1 1 0 1 0 .13-.61L12.82 6a.31.31 0 0 0-.37.24l-.74 3.47a7.14 7.14 0 0 0-3.9 1.23 1.46 1.46 0 1 0-1.61 2.39 2.87 2.87 0 0 0 0 .44c0 2.24 2.61 4.06 5.83 4.06s5.83-1.82 5.83-4.06a2.87 2.87 0 0 0 0-.44 1.46 1.46 0 0 0 .81-1.33zm-10 1a1 1 0 1 1 2 0 1 1 0 0 1-2 0zm5.81 2.75a3.84 3.84 0 0 1-2.47.77 3.84 3.84 0 0 1-2.47-.77.27.27 0 0 1 .38-.38A3.27 3.27 0 0 0 12 16a3.28 3.28 0 0 0 2.09-.61.28.28 0 1 1 .39.4v-.04zm-.18-1.71a1 1 0 1 1 1-1 1 1 0 0 1-1.01 1.04l.01-.04z\'/%3E%3C/g%3E%3C/svg%3E%0A',
},
{
label: 'Discord',
to: 'https://discord.com/invite/cA7y6ezyE2',
icon: 'data:image/svg+xml,%3Csvg width=\'24\' height=\'18\' viewBox=\'0 0 24 18\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath fill-rule=\'evenodd\' clip-rule=\'evenodd\' d=\'M17.7158 17.2639C22.2578 17.12 24.0047 14.14 24.0047 14.14C24.0047 7.52221 21.0453 2.15813 21.0453 2.15813C18.0858 -0.0614848 15.2701 0.000170789 15.2701 0.000170789L14.9824 0.329003C18.4763 1.39771 20.0999 2.93911 20.0999 2.93911C17.9625 1.76764 15.8662 1.19219 13.9137 0.966116C12.434 0.801699 11.0159 0.842803 9.7622 1.00722L9.41282 1.04832C8.6935 1.10998 6.94658 1.37716 4.74751 2.3431C3.98709 2.69248 3.53495 2.93911 3.53495 2.93911C3.53495 2.93911 5.24076 1.3155 8.94013 0.246795L8.7346 0.000170789C8.7346 0.000170789 5.91898 -0.0614848 2.95949 2.15813C2.95949 2.15813 0 7.52221 0 14.14C0 14.14 1.72637 17.12 6.26836 17.2639C6.26836 17.2639 7.02879 16.339 7.64535 15.558C5.03524 14.7771 4.04875 13.1329 4.04875 13.1329L4.6242 13.4823L4.70641 13.5439L4.78691 13.5902L4.81088 13.6005L4.89138 13.6467C5.40518 13.9344 5.91898 14.1605 6.39167 14.3455C7.23431 14.6743 8.24136 15.0031 9.41282 15.2292C10.9542 15.5169 12.7628 15.6197 14.7358 15.2498C15.7017 15.0853 16.6882 14.7976 17.7158 14.366C18.4352 14.0989 19.2367 13.7084 20.0793 13.1535C20.0793 13.1535 19.0517 14.8387 16.3594 15.5991C16.976 16.3801 17.7158 17.2639 17.7158 17.2639ZM8.15915 7.66607C6.98768 7.66607 6.06284 8.69367 6.06284 9.94734C6.06284 11.201 7.00824 12.2286 8.15915 12.2286C9.33061 12.2286 10.2555 11.201 10.2555 9.94734C10.276 8.69367 9.33061 7.66607 8.15915 7.66607ZM15.6606 7.66607C14.4892 7.66607 13.5643 8.69367 13.5643 9.94734C13.5643 11.201 14.5097 12.2286 15.6606 12.2286C16.8321 12.2286 17.7569 11.201 17.7569 9.94734C17.7569 8.69367 16.8321 7.66607 15.6606 7.66607Z\' fill=\'white\'/%3E%3C/svg%3E%0A',
},
{
label: 'GitHub',
to: 'https://github.com/dfinity',
icon: 'data:image/svg+xml,%3Csvg width=\'24px\' height=\'24px\' viewBox=\'0 0 64 64\' id=\'i-github\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath stroke-width=\'0\' fill=\'white\' d=\'M32 0 C14 0 0 14 0 32 0 53 19 62 22 62 24 62 24 61 24 60 L24 55 C17 57 14 53 13 50 13 50 13 49 11 47 10 46 6 44 10 44 13 44 15 48 15 48 18 52 22 51 24 50 24 48 26 46 26 46 18 45 12 42 12 31 12 27 13 24 15 22 15 22 13 18 15 13 15 13 20 13 24 17 27 15 37 15 40 17 44 13 49 13 49 13 51 20 49 22 49 22 51 24 52 27 52 31 52 42 45 45 38 46 39 47 40 49 40 52 L40 60 C40 61 40 62 42 62 45 62 64 53 64 32 64 14 50 0 32 0 Z\' /%3E%3C/svg%3E',
},
{
label: 'Twitter',
to: 'https://twitter.com/dfinity',
icon: 'data:image/svg+xml,%3Csvg width=\'24\' height=\'20\' viewBox=\'0 0 24 20\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M24 2.55699C23.117 2.94899 22.168 3.21299 21.172 3.33199C22.189 2.72299 22.97 1.75799 23.337 0.607986C22.386 1.17199 21.332 1.58199 20.21 1.80299C19.313 0.845986 18.032 0.247986 16.616 0.247986C13.437 0.247986 11.101 3.21399 11.819 6.29299C7.728 6.08799 4.1 4.12799 1.671 1.14899C0.381 3.36199 1.002 6.25699 3.194 7.72299C2.388 7.69699 1.628 7.47599 0.965 7.10699C0.911 9.38799 2.546 11.522 4.914 11.997C4.221 12.185 3.462 12.229 2.69 12.081C3.316 14.037 5.134 15.46 7.29 15.5C5.22 17.123 2.612 17.848 0 17.54C2.179 18.937 4.768 19.752 7.548 19.752C16.69 19.752 21.855 12.031 21.543 5.10599C22.505 4.41099 23.34 3.54399 24 2.55699Z\' fill=\'white\'/%3E%3C/svg%3E%0A',
},
{
label: 'IC Forum',
to: 'https://forum.dfinity.org/',
icon: 'data:image/svg+xml,%3Csvg width=\'24\' height=\'24\' viewBox=\'0 0 24 24\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath fillRule=\'evenodd\' clipRule=\'evenodd\' d=\'M2.08863 21.3024L7.37963 20.1264C8.82825 20.9008 10.446 21.3048 12.0886 21.3024C17.6116 21.3024 22.0886 16.8254 22.0886 11.3024C22.0886 5.77937 17.6116 1.30237 12.0886 1.30237C6.56563 1.30237 2.08863 5.77937 2.08863 11.3024C2.08616 12.945 2.49017 14.5628 3.26463 16.0114L2.08863 21.3024ZM13.1036 8.76534C13.9981 7.9495 14.8455 7.53567 15.6223 7.53567C17.4818 7.53567 18.9941 9.06685 19 10.9527C19 11.2247 18.9646 11.4907 18.9058 11.7449C18.9035 11.7546 18.8977 11.7763 18.8873 11.8075C18.5062 13.2627 17.1899 14.3403 15.6296 14.3461C14.3375 14.3461 13.0317 13.1057 12.0633 11.9866L12.0578 11.9933C12.0578 11.9933 11.6223 11.5026 11.1456 10.9764C11.1456 10.9764 10.6043 10.3497 10.0275 9.79993C9.87049 9.6504 9.28353 9.17699 8.58501 8.89833C8.54213 8.89211 8.50396 8.88975 8.47049 8.88975C7.35241 8.90158 6.44618 9.81791 6.44618 10.9412C6.44618 12.0763 7.35241 12.9926 8.47049 12.9926C8.76471 12.9926 9.28844 12.8389 10.0829 12.1176C10.5124 11.7275 10.8831 11.2959 11.1421 10.9767C11.6188 11.5028 12.0542 11.9935 12.0542 11.9935C11.7835 12.3246 11.4128 12.7384 10.9891 13.1227C10.0946 13.9385 9.24727 14.3524 8.47049 14.3524C6.60507 14.3524 5.09273 12.8212 5.09273 10.9353C5.09273 10.6633 5.12804 10.3973 5.18688 10.1431C5.19098 10.1256 5.20651 10.0691 5.24019 9.98785C5.65003 8.57662 6.94483 7.54136 8.47404 7.53567C9.76574 7.53567 11.071 8.7753 12.0354 9.89405L12.04 9.88858L12.0417 9.89052C12.3122 9.56013 12.6816 9.14808 13.1036 8.76534ZM15.6223 12.9983C15.6044 12.9983 15.5852 12.9976 15.5647 12.996C14.8431 12.7245 14.2315 12.2355 14.0702 12.0819C13.5124 11.5501 12.9877 10.9465 12.9538 10.9074C13.2126 10.5886 13.582 10.1589 14.0098 9.77037C14.8043 9.04321 15.3221 8.89541 15.6223 8.89541C16.7403 8.89541 17.6466 9.81174 17.6466 10.9469C17.6466 12.0701 16.7403 12.9864 15.6223 12.9983Z\' fill=\'white\'/%3E%3C/svg%3E',
},
]
},
],
copyright: `© ${new Date().getFullYear()} Internet Computer`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;