1
1
// @ts -check
2
2
// Note: type annotations allow type checking and IDEs autocompletion
3
3
4
- import fs from "fs" ;
4
+ import fs from 'fs'
5
5
require ( 'dotenv' ) . config ( )
6
6
const { themes } = require ( 'prism-react-renderer' )
7
7
const { REF_ALLOW_LOGIN_PATH } = require ( './src/lib/constants' )
@@ -12,11 +12,14 @@ const {
12
12
MM_RPC_URL ,
13
13
} = require ( './src/plugins/plugin-json-rpc' )
14
14
const codeTheme = themes . dracula
15
- const helpDropdown = fs . readFileSync ( "./src/components/NavDropdown/DeveloperTools.html" , "utf-8" ) ;
16
- const connectDropdown = fs . readFileSync ( "./src/components/NavDropdown/ConnectMetaMask.html" , "utf-8" ) ;
17
- const embedDropdown = fs . readFileSync ( "./src/components/NavDropdown/EmbedMetaMask.html" , "utf-8" ) ;
18
- const extendDropdown = fs . readFileSync ( "./src/components/NavDropdown/ExtendScale.html" , "utf-8" ) ;
19
- const npm2yarnPlugin = [ require ( "@docusaurus/remark-plugin-npm2yarn" ) , { sync : true } ] ;
15
+ const helpDropdown = fs . readFileSync ( './src/components/NavDropdown/DeveloperTools.html' , 'utf-8' )
16
+ const connectDropdown = fs . readFileSync (
17
+ './src/components/NavDropdown/ConnectMetaMask.html' ,
18
+ 'utf-8'
19
+ )
20
+ const embedDropdown = fs . readFileSync ( './src/components/NavDropdown/EmbedMetaMask.html' , 'utf-8' )
21
+ const extendDropdown = fs . readFileSync ( './src/components/NavDropdown/ExtendScale.html' , 'utf-8' )
22
+ const npm2yarnPlugin = [ require ( '@docusaurus/remark-plugin-npm2yarn' ) , { sync : true } ]
20
23
/** @type {import('@docusaurus/types').Config } */
21
24
const config = {
22
25
title : 'MetaMask developer documentation' ,
@@ -123,17 +126,17 @@ const config = {
123
126
sidebarCollapsed : false ,
124
127
includeCurrentVersion : true ,
125
128
// Set to the latest release.
126
- lastVersion : " 0.12.0" ,
129
+ lastVersion : ' 0.12.0' ,
127
130
versions : {
128
131
// Defaults to the ./docs folder.
129
132
// Using "development" instead of "next" as path.
130
133
current : {
131
- label : " development" ,
132
- path : " development" ,
134
+ label : ' development' ,
135
+ path : ' development' ,
133
136
} ,
134
137
// The latest release.
135
- " 0.12.0" : {
136
- label : " latest (0.12.0)" ,
138
+ ' 0.12.0' : {
139
+ label : ' latest (0.12.0)' ,
137
140
} ,
138
141
} ,
139
142
} ,
@@ -216,50 +219,51 @@ const config = {
216
219
( {
217
220
metadata : [
218
221
{
219
- name : "keywords" ,
220
- content : "MetaMask, SDK, Wallet, API, Dapp, App, Connect, Delegation, Toolkit, Documentation, Smart, Account, Snaps, Infura, Services, Dashboard" ,
222
+ name : 'keywords' ,
223
+ content :
224
+ 'MetaMask, SDK, Wallet, API, Dapp, App, Connect, Delegation, Toolkit, Documentation, Smart, Account, Snaps, Infura, Services, Dashboard' ,
221
225
} ,
222
226
// Twitter-specific meta tags
223
227
{
224
- name : " twitter:card" ,
225
- content : " summary_large_image" ,
228
+ name : ' twitter:card' ,
229
+ content : ' summary_large_image' ,
226
230
} ,
227
231
{
228
- name : " twitter:image" ,
229
- content : " https://docs.metamask.io/img/metamaskog.jpeg" ,
232
+ name : ' twitter:image' ,
233
+ content : ' https://docs.metamask.io/img/metamaskog.jpeg' ,
230
234
} ,
231
235
{
232
- name : " twitter:image:alt" ,
233
- content : " MetaMask Developer Documentation" ,
236
+ name : ' twitter:image:alt' ,
237
+ content : ' MetaMask Developer Documentation' ,
234
238
} ,
235
239
{
236
- name : " twitter:site" ,
237
- content : " @MetaMask" ,
240
+ name : ' twitter:site' ,
241
+ content : ' @MetaMask' ,
238
242
} ,
239
243
{
240
- name : " twitter:creator" ,
241
- content : " @MetaMask" ,
244
+ name : ' twitter:creator' ,
245
+ content : ' @MetaMask' ,
242
246
} ,
243
247
// Open Graph meta tags for better social sharing
244
248
{
245
- property : " og:image" ,
246
- content : " https://docs.metamask.io/img/metamaskog.jpeg" ,
249
+ property : ' og:image' ,
250
+ content : ' https://docs.metamask.io/img/metamaskog.jpeg' ,
247
251
} ,
248
252
{
249
- property : " og:image:width" ,
250
- content : " 1200" ,
253
+ property : ' og:image:width' ,
254
+ content : ' 1200' ,
251
255
} ,
252
256
{
253
- property : " og:image:height" ,
254
- content : " 630" ,
257
+ property : ' og:image:height' ,
258
+ content : ' 630' ,
255
259
} ,
256
260
{
257
- property : " og:image:alt" ,
258
- content : " MetaMask Developer Documentation" ,
261
+ property : ' og:image:alt' ,
262
+ content : ' MetaMask Developer Documentation' ,
259
263
} ,
260
264
{
261
- property : " og:type" ,
262
- content : " website" ,
265
+ property : ' og:type' ,
266
+ content : ' website' ,
263
267
} ,
264
268
] ,
265
269
image : '/img/metamaskog.jpeg' ,
@@ -280,7 +284,7 @@ const config = {
280
284
label : 'Connect to MetaMask' ,
281
285
items : [
282
286
{
283
- type : " html" ,
287
+ type : ' html' ,
284
288
value : connectDropdown ,
285
289
} ,
286
290
] ,
@@ -290,7 +294,7 @@ const config = {
290
294
label : 'Embed MetaMask' ,
291
295
items : [
292
296
{
293
- type : " html" ,
297
+ type : ' html' ,
294
298
value : embedDropdown ,
295
299
} ,
296
300
] ,
@@ -300,7 +304,7 @@ const config = {
300
304
label : 'Extend and scale' ,
301
305
items : [
302
306
{
303
- type : " html" ,
307
+ type : ' html' ,
304
308
value : extendDropdown ,
305
309
} ,
306
310
] ,
@@ -310,7 +314,7 @@ const config = {
310
314
label : 'Developer tools' ,
311
315
items : [
312
316
{
313
- type : " html" ,
317
+ type : ' html' ,
314
318
value : helpDropdown ,
315
319
} ,
316
320
] ,
@@ -449,6 +453,10 @@ const config = {
449
453
label : 'Contributor License Agreement' ,
450
454
href : 'https://metamask.io/cla/' ,
451
455
} ,
456
+ {
457
+ label : 'Accessibility' ,
458
+ href : 'https://consensys.io/accessibility' ,
459
+ } ,
452
460
{
453
461
html : "<button id='manage-cookie-btn'>Manage cookies</button>" ,
454
462
} ,
@@ -462,14 +470,14 @@ const config = {
462
470
additionalLanguages : [ 'csharp' , 'gradle' , 'bash' , 'json' ] ,
463
471
magicComments : [
464
472
{
465
- className : " git-diff-remove" ,
466
- line : " remove-next-line" ,
467
- block : { start : " remove-start" , end : " remove-end" } ,
473
+ className : ' git-diff-remove' ,
474
+ line : ' remove-next-line' ,
475
+ block : { start : ' remove-start' , end : ' remove-end' } ,
468
476
} ,
469
477
{
470
- className : " git-diff-add" ,
471
- line : " add-next-line" ,
472
- block : { start : " add-start" , end : " add-end" } ,
478
+ className : ' git-diff-add' ,
479
+ line : ' add-next-line' ,
480
+ block : { start : ' add-start' , end : ' add-end' } ,
473
481
} ,
474
482
] ,
475
483
} ,
0 commit comments