11// @ts -check
22// Note: type annotations allow type checking and IDEs autocompletion
33
4- import fs from "fs" ;
4+ import fs from 'fs'
55require ( 'dotenv' ) . config ( )
66const { themes } = require ( 'prism-react-renderer' )
77const { REF_ALLOW_LOGIN_PATH } = require ( './src/lib/constants' )
@@ -12,11 +12,14 @@ const {
1212 MM_RPC_URL ,
1313} = require ( './src/plugins/plugin-json-rpc' )
1414const 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 } ]
2023/** @type {import('@docusaurus/types').Config } */
2124const config = {
2225 title : 'MetaMask developer documentation' ,
@@ -123,17 +126,17 @@ const config = {
123126 sidebarCollapsed : false ,
124127 includeCurrentVersion : true ,
125128 // Set to the latest release.
126- lastVersion : " 0.12.0" ,
129+ lastVersion : ' 0.12.0' ,
127130 versions : {
128131 // Defaults to the ./docs folder.
129132 // Using "development" instead of "next" as path.
130133 current : {
131- label : " development" ,
132- path : " development" ,
134+ label : ' development' ,
135+ path : ' development' ,
133136 } ,
134137 // The latest release.
135- " 0.12.0" : {
136- label : " latest (0.12.0)" ,
138+ ' 0.12.0' : {
139+ label : ' latest (0.12.0)' ,
137140 } ,
138141 } ,
139142 } ,
@@ -216,50 +219,51 @@ const config = {
216219 ( {
217220 metadata : [
218221 {
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' ,
221225 } ,
222226 // Twitter-specific meta tags
223227 {
224- name : " twitter:card" ,
225- content : " summary_large_image" ,
228+ name : ' twitter:card' ,
229+ content : ' summary_large_image' ,
226230 } ,
227231 {
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' ,
230234 } ,
231235 {
232- name : " twitter:image:alt" ,
233- content : " MetaMask Developer Documentation" ,
236+ name : ' twitter:image:alt' ,
237+ content : ' MetaMask Developer Documentation' ,
234238 } ,
235239 {
236- name : " twitter:site" ,
237- content : " @MetaMask" ,
240+ name : ' twitter:site' ,
241+ content : ' @MetaMask' ,
238242 } ,
239243 {
240- name : " twitter:creator" ,
241- content : " @MetaMask" ,
244+ name : ' twitter:creator' ,
245+ content : ' @MetaMask' ,
242246 } ,
243247 // Open Graph meta tags for better social sharing
244248 {
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' ,
247251 } ,
248252 {
249- property : " og:image:width" ,
250- content : " 1200" ,
253+ property : ' og:image:width' ,
254+ content : ' 1200' ,
251255 } ,
252256 {
253- property : " og:image:height" ,
254- content : " 630" ,
257+ property : ' og:image:height' ,
258+ content : ' 630' ,
255259 } ,
256260 {
257- property : " og:image:alt" ,
258- content : " MetaMask Developer Documentation" ,
261+ property : ' og:image:alt' ,
262+ content : ' MetaMask Developer Documentation' ,
259263 } ,
260264 {
261- property : " og:type" ,
262- content : " website" ,
265+ property : ' og:type' ,
266+ content : ' website' ,
263267 } ,
264268 ] ,
265269 image : '/img/metamaskog.jpeg' ,
@@ -280,7 +284,7 @@ const config = {
280284 label : 'Connect to MetaMask' ,
281285 items : [
282286 {
283- type : " html" ,
287+ type : ' html' ,
284288 value : connectDropdown ,
285289 } ,
286290 ] ,
@@ -290,7 +294,7 @@ const config = {
290294 label : 'Embed MetaMask' ,
291295 items : [
292296 {
293- type : " html" ,
297+ type : ' html' ,
294298 value : embedDropdown ,
295299 } ,
296300 ] ,
@@ -300,7 +304,7 @@ const config = {
300304 label : 'Extend and scale' ,
301305 items : [
302306 {
303- type : " html" ,
307+ type : ' html' ,
304308 value : extendDropdown ,
305309 } ,
306310 ] ,
@@ -310,7 +314,7 @@ const config = {
310314 label : 'Developer tools' ,
311315 items : [
312316 {
313- type : " html" ,
317+ type : ' html' ,
314318 value : helpDropdown ,
315319 } ,
316320 ] ,
@@ -449,6 +453,10 @@ const config = {
449453 label : 'Contributor License Agreement' ,
450454 href : 'https://metamask.io/cla/' ,
451455 } ,
456+ {
457+ label : 'Accessibility' ,
458+ href : 'https://consensys.io/accessibility' ,
459+ } ,
452460 {
453461 html : "<button id='manage-cookie-btn'>Manage cookies</button>" ,
454462 } ,
@@ -462,14 +470,14 @@ const config = {
462470 additionalLanguages : [ 'csharp' , 'gradle' , 'bash' , 'json' ] ,
463471 magicComments : [
464472 {
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' } ,
468476 } ,
469477 {
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' } ,
473481 } ,
474482 ] ,
475483 } ,
0 commit comments