diff --git a/docusaurus.config.js b/docusaurus.config.js index 1625a2ccf8..6606a7a829 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -21,284 +21,281 @@ module.exports = { locales: ['en', 'es'] }, themes: ['@docusaurus/theme-live-codeblock'], - scripts: [ - { - src: 'https://cdnjs.cloudflare.com/ajax/libs/web3/1.6.0/web3.min.js', - async: true, - }, - ], + scripts: [{ + src: 'https://cdnjs.cloudflare.com/ajax/libs/web3/1.6.0/web3.min.js', + async: true, + }, ], plugins: [ require.resolve('docusaurus-plugin-fathom'), path.resolve(__dirname, 'src/plugins/aliases.ts'), [ '@docusaurus/plugin-client-redirects', { - redirects: [ - { - to: '/celo-owner-guide/ledger', - from: [ - '/operations-manual/key-management/using-a-ledger-wallet', - '/operations-manual/key-management/ledger', - '/operations-manual/summary/ledger', - '/operations-manual/using-a-ledger-wallet', - '/validator-guide/key-management/using-a-ledger-wallet', - '/validator-guide/key-management/ledger', - '/validator-guide/summary/ledger', - '/validator-guide/using-a-ledger-wallet', - '/celo-gold-holder-guide/ledger', - ] - }, - { - to: '/getting-started/baklava-testnet/running-a-full-node-in-baklava', - from: [ - '/getting-started/running-a-full-node', - '/getting-started/running-a-validator', - '/getting-started/running-a-full-node-in-baklava' - ], - }, - { - to: '/getting-started/using-the-wallet', - from: [ - '/getting-started/using-the-mobile-wallet', - ], - }, - { - to: '/celo-owner-guide/release-gold', - from: [ - '/celo-codebase/protocol/release-gold', - '/celo-holder-guide/release-gold', - '/celo-gold-holder-guide/release-gold', - ] - }, - { - to: '/developer-guide/start', - from: [ - '/developer-guide/start/celo-truffle-box', - '/developer-resources/walkthroughs/hello-mobile-dapp', - ], - }, - { - to: '/developer-guide/overview', - from: [ - '/developer-guide/overview/introduction', - '/developer-resources/overview', - ], - }, - { - to: '/developer-guide/development-chain', - from: ['/developer-guide/start/development-chain'], - }, - { - to: '/important-information/mainnet-network-disclaimer', - from: ['/important-information/rc-network-disclaimer'], - }, - { - to: '/getting-started/mainnet', - from: ['/getting-started/rc1'], - }, - { - to: '/getting-started/mainnet/running-a-full-node-in-mainnet', - from: [ - '/getting-started/rc1/running-a-full-node-in-rc1', - '/getting-started/running-a-full-node-in-mainnet', - ], - }, - { - to: '/getting-started/mainnet/running-a-validator-in-mainnet', - from: [ - '/getting-started/rc1/running-a-validator-in-rc1', - '/getting-started/running-a-validator-in-mainnet', - ], - }, - { - to: '/celo-owner-guide/quick-start', - from: [ - '/celo-gold-holder-guide/quick-start', - '/celo-holder-guide/quick-start', - ], - }, - { - to: '/celo-owner-guide/voting-governance', - from: [ - '/celo-gold-holder-guide/voting-governance', - '/celo-holder-guide/voting-governance', - ], - }, - { - to: '/celo-owner-guide/voting-validators', - from: [ - '/celo-gold-holder-guide/voting-validators', - '/celo-holder-guide/voting-validators', - ], - }, - { - to: '/celo-owner-guide/cusd', - from: ['/celo-holder-guide/cusd'], - }, - { - to: '/celo-owner-guide/eth-recovery', - from: [ - '/celo-holder-guide/eth-recovery' - ], - }, - { - to: '/celo-owner-guide/celo-recovery', - from: [ - '/celo-holder-guide/celo-recovery' - ], - }, - { - to: '/developer-guide/overview', - from: [ - '/v/master/developer-guide/overview' - ] - }, - { - to: '/developer-guide/start', - from: [ - '/v/master/developer-guide/start' - ] - }, - { - to: '/command-line-interface/account', - from: [ - '/command-line-interface/commands/account', - ] - }, - { - to: '/command-line-interface/autocomplete', - from: [ - '/command-line-interface/commands/autocomplete', - ] - }, - { - to: '/command-line-interface/commands', - from: [ - '/command-line-interface/commands/commands', - ] - }, - { - to: '/command-line-interface/config', - from: [ - '/command-line-interface/commands/config', - ] - }, - { - to: '/command-line-interface/dkg', - from: [ - '/command-line-interface/commands/dkg', - ] - }, - { - to: '/command-line-interface/election', - from: [ - '/command-line-interface/commands/election', - ] - }, - { - to: '/command-line-interface/exchange', - from: [ - '/command-line-interface/commands/exchange', - ] - }, - { - to: '/command-line-interface/governance', - from: [ - '/command-line-interface/commands/governance', - ] - }, - { - to: '/command-line-interface/help', - from: [ - '/command-line-interface/commands/help', - ] - }, - { - to: '/command-line-interface/identity', - from: [ - '/command-line-interface/commands/identity', - ] - }, - { - to: '/command-line-interface/lockedgold', - from: [ - '/command-line-interface/commands/lockedgold', - ] - }, - { - to: '/command-line-interface/multisig', - from: [ - '/command-line-interface/commands/multisig', - ] - }, - { - to: '/command-line-interface/network', - from: [ - '/command-line-interface/commands/network', - ] - }, - { - to: '/command-line-interface/node', - from: [ - '/command-line-interface/commands/node', - ] - }, - { - to: '/command-line-interface/oracle', - from: [ - '/command-line-interface/commands/oracle', - ] - }, - { - to: '/command-line-interface/plugins', - from: [ - '/command-line-interface/commands/plugins', - ] - }, - { - to: '/command-line-interface/introduction', - from: [ - '/command-line-interface/commands/registry', - '/command-line-interface/registry' - ] - }, - { - to: '/command-line-interface/releasegold', - from: [ - '/command-line-interface/commands/releasegold', - ] - }, - { - to: '/command-line-interface/reserve', - from: [ - '/command-line-interface/commands/reserve', - ] - }, - { - to: '/command-line-interface/rewards', - from: [ - '/command-line-interface/commands/rewards', - ] - }, - { - to: '/command-line-interface/transfer', - from: [ - '/command-line-interface/commands/transfer', - ] - }, - { - to: '/command-line-interface/validator', - from: [ - '/command-line-interface/commands/validator', - ] - }, - { - to: '/command-line-interface/validatorgroup', - from: [ - '/command-line-interface/commands/validatorgroup', - ] - }, - ], + redirects: [{ + to: '/celo-owner-guide/ledger', + from: [ + '/operations-manual/key-management/using-a-ledger-wallet', + '/operations-manual/key-management/ledger', + '/operations-manual/summary/ledger', + '/operations-manual/using-a-ledger-wallet', + '/validator-guide/key-management/using-a-ledger-wallet', + '/validator-guide/key-management/ledger', + '/validator-guide/summary/ledger', + '/validator-guide/using-a-ledger-wallet', + '/celo-gold-holder-guide/ledger', + ] + }, + { + to: '/getting-started/baklava-testnet/running-a-full-node-in-baklava', + from: [ + '/getting-started/running-a-full-node', + '/getting-started/running-a-validator', + '/getting-started/running-a-full-node-in-baklava' + ], + }, + { + to: '/getting-started/using-the-wallet', + from: [ + '/getting-started/using-the-mobile-wallet', + ], + }, + { + to: '/celo-owner-guide/release-gold', + from: [ + '/celo-codebase/protocol/release-gold', + '/celo-holder-guide/release-gold', + '/celo-gold-holder-guide/release-gold', + ] + }, + { + to: '/developer-guide/start', + from: [ + '/developer-guide/start/celo-truffle-box', + '/developer-resources/walkthroughs/hello-mobile-dapp', + ], + }, + { + to: '/developer-guide/overview', + from: [ + '/developer-guide/overview/introduction', + '/developer-resources/overview', + ], + }, + { + to: '/developer-guide/development-chain', + from: ['/developer-guide/start/development-chain'], + }, + { + to: '/important-information/mainnet-network-disclaimer', + from: ['/important-information/rc-network-disclaimer'], + }, + { + to: '/getting-started/mainnet', + from: ['/getting-started/rc1'], + }, + { + to: '/getting-started/mainnet/running-a-full-node-in-mainnet', + from: [ + '/getting-started/rc1/running-a-full-node-in-rc1', + '/getting-started/running-a-full-node-in-mainnet', + ], + }, + { + to: '/getting-started/mainnet/running-a-validator-in-mainnet', + from: [ + '/getting-started/rc1/running-a-validator-in-rc1', + '/getting-started/running-a-validator-in-mainnet', + ], + }, + { + to: '/celo-owner-guide/quick-start', + from: [ + '/celo-gold-holder-guide/quick-start', + '/celo-holder-guide/quick-start', + ], + }, + { + to: '/celo-owner-guide/voting-governance', + from: [ + '/celo-gold-holder-guide/voting-governance', + '/celo-holder-guide/voting-governance', + ], + }, + { + to: '/celo-owner-guide/voting-validators', + from: [ + '/celo-gold-holder-guide/voting-validators', + '/celo-holder-guide/voting-validators', + ], + }, + { + to: '/celo-owner-guide/cusd', + from: ['/celo-holder-guide/cusd'], + }, + { + to: '/celo-owner-guide/eth-recovery', + from: [ + '/celo-holder-guide/eth-recovery' + ], + }, + { + to: '/celo-owner-guide/celo-recovery', + from: [ + '/celo-holder-guide/celo-recovery' + ], + }, + { + to: '/developer-guide/overview', + from: [ + '/v/master/developer-guide/overview' + ] + }, + { + to: '/developer-guide/start', + from: [ + '/v/master/developer-guide/start' + ] + }, + { + to: '/command-line-interface/account', + from: [ + '/command-line-interface/commands/account', + ] + }, + { + to: '/command-line-interface/autocomplete', + from: [ + '/command-line-interface/commands/autocomplete', + ] + }, + { + to: '/command-line-interface/commands', + from: [ + '/command-line-interface/commands/commands', + ] + }, + { + to: '/command-line-interface/config', + from: [ + '/command-line-interface/commands/config', + ] + }, + { + to: '/command-line-interface/dkg', + from: [ + '/command-line-interface/commands/dkg', + ] + }, + { + to: '/command-line-interface/election', + from: [ + '/command-line-interface/commands/election', + ] + }, + { + to: '/command-line-interface/exchange', + from: [ + '/command-line-interface/commands/exchange', + ] + }, + { + to: '/command-line-interface/governance', + from: [ + '/command-line-interface/commands/governance', + ] + }, + { + to: '/command-line-interface/help', + from: [ + '/command-line-interface/commands/help', + ] + }, + { + to: '/command-line-interface/identity', + from: [ + '/command-line-interface/commands/identity', + ] + }, + { + to: '/command-line-interface/lockedgold', + from: [ + '/command-line-interface/commands/lockedgold', + ] + }, + { + to: '/command-line-interface/multisig', + from: [ + '/command-line-interface/commands/multisig', + ] + }, + { + to: '/command-line-interface/network', + from: [ + '/command-line-interface/commands/network', + ] + }, + { + to: '/command-line-interface/node', + from: [ + '/command-line-interface/commands/node', + ] + }, + { + to: '/command-line-interface/oracle', + from: [ + '/command-line-interface/commands/oracle', + ] + }, + { + to: '/command-line-interface/plugins', + from: [ + '/command-line-interface/commands/plugins', + ] + }, + { + to: '/command-line-interface/introduction', + from: [ + '/command-line-interface/commands/registry', + '/command-line-interface/registry' + ] + }, + { + to: '/command-line-interface/releasegold', + from: [ + '/command-line-interface/commands/releasegold', + ] + }, + { + to: '/command-line-interface/reserve', + from: [ + '/command-line-interface/commands/reserve', + ] + }, + { + to: '/command-line-interface/rewards', + from: [ + '/command-line-interface/commands/rewards', + ] + }, + { + to: '/command-line-interface/transfer', + from: [ + '/command-line-interface/commands/transfer', + ] + }, + { + to: '/command-line-interface/validator', + from: [ + '/command-line-interface/commands/validator', + ] + }, + { + to: '/command-line-interface/validatorgroup', + from: [ + '/command-line-interface/commands/validatorgroup', + ] + }, + ], }, ] ], @@ -315,8 +312,7 @@ module.exports = { alt: "Celo Logo", src: "img/color-logo.png", }, - items: [ - { + items: [{ "to": "welcome", "label": "Welcome", "position": "left" @@ -350,16 +346,14 @@ module.exports = { "to": "/blog", "label": "Blog", "position": "right" - }, + }, { type: 'localeDropdown', position: 'right', - dropdownItemsAfter: [ - { - to: 'https://celo.crowdin.com/', - label: 'Help us translate', - }, - ] + dropdownItemsAfter: [{ + to: 'https://celo.crowdin.com/', + label: 'Help us translate', + }, ] }, { href: 'https://github.com/celo-org', @@ -369,12 +363,6 @@ module.exports = { }, ], }, - gtag: { - // You can also use your "G-" Measurement ID here. - trackingID: 'G-0CXEKQ81V2', - // Optional fields. - anonymizeIP: true, // Should IPs be anonymized? - }, algolia: { appId: '55M4I38S60', apiKey: 'baed78b52be14ac907688f1dd70b41d5', @@ -387,26 +375,26 @@ module.exports = { links: [{ title: "Docs", items: [{ - label: "Home", - to: "/", - }, - { - label: "Blog", - to: "/blog" - }, - { - href: "https://celo.crowdin.com/celo-docs", - label: "Help translate" - }, - { - label: "Docs GitHub", - href: "https://github.com/celo-org/docs" - }, - ]}, + label: "Home", + to: "/", + }, + { + label: "Blog", + to: "/blog" + }, + { + href: "https://celo.crowdin.com/celo-docs", + label: "Help translate" + }, + { + label: "Docs GitHub", + href: "https://github.com/celo-org/docs" + }, + ] + }, { title: "Community", - items: [ - { + items: [{ href: "/community/contributing", label: "Contributors", }, @@ -435,26 +423,26 @@ module.exports = { { title: "Ecosystem", items: [{ - label: "Celo Foundation", - href: "https://celo.org" - }, - { - label: "Medium Blog", - href: "https://medium.com/celoorg" - }, - { - label: "The Celo", - href: "https://thecelo.com/" - }, - { - label: "Celo Hub", - href: "https://celohub.org/" - }, - { - label: "Careers", - href: "https://celo.org/jobs" - } - ] + label: "Celo Foundation", + href: "https://celo.org" + }, + { + label: "Medium Blog", + href: "https://medium.com/celoorg" + }, + { + label: "The Celo", + href: "https://thecelo.com/" + }, + { + label: "Celo Hub", + href: "https://celohub.org/" + }, + { + label: "Careers", + href: "https://celo.org/jobs" + } + ] } ], copyright: `Copyright © ${new Date().getFullYear()} Celo Foundation, Inc. Built with Docusaurus.`, @@ -472,10 +460,10 @@ module.exports = { sidebarPath: require.resolve("./sidebars.js"), // Please change this to your repo. editUrl: "https://github.com/celo-org/docs/edit/main/", - editUrl: ({locale, versionDocsDirPath, docPath}) => { + editUrl: ({ locale, versionDocsDirPath, docPath }) => { // Link to Crowdin for French docs if (locale !== DefaultLocale) { - return `https://celo.crowdin.com/celo-docs/${locale}`; + return `https://celo.crowdin.com/celo-docs/${locale}`; } // Link to Github for English docs return `https://github.com/celo-org/docs/edit/main/docs/${docPath}` @@ -483,7 +471,7 @@ module.exports = { routeBasePath: "/", remarkPlugins: [ math, - [require('@docusaurus/remark-plugin-npm2yarn'), {sync: true}] + [require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }] ], rehypePlugins: [katex], }, @@ -495,10 +483,16 @@ module.exports = { blogSidebarTitle: 'All posts', blogSidebarCount: 'ALL', showReadingTime: true, - readingTime: ({content, frontMatter, defaultReadingTime}) => + readingTime: ({ content, frontMatter, defaultReadingTime }) => // allows per post reading time override in frontmatter - frontMatter.hide_reading_time ? undefined : defaultReadingTime({content, options: {wordsPerMinute: 300}}), - } + frontMatter.hide_reading_time ? undefined : defaultReadingTime({ content, options: { wordsPerMinute: 300 } }), + }, + gtag: { + // You can also use your "G-" Measurement ID here. + trackingID: 'G-0CXEKQ81V2', + // Optional fields. + anonymizeIP: true, // Should IPs be anonymized? + }, }, ], ], @@ -507,4 +501,4 @@ module.exports = { integrity: 'sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc', crossorigin: 'anonymous', }], -}; +}; \ No newline at end of file diff --git a/package.json b/package.json index 861879a0b9..6682e75a55 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,11 @@ }, "dependencies": { "@crowdin/cli": "^3.7.0", - "@docusaurus/core": "^2.0.0-beta.9", - "@docusaurus/plugin-client-redirects": "^2.0.0-beta.9", - "@docusaurus/preset-classic": "^2.0.0-beta.9", - "@docusaurus/theme-live-codeblock": "^2.0.0-beta.9", + "@docusaurus/core": "^2.0.0-beta.21", + "@docusaurus/plugin-client-redirects": "^2.0.0-beta.21", + "@docusaurus/preset-classic": "^2.0.0-beta.21", "@docusaurus/remark-plugin-npm2yarn": "^2.0.0-beta.9", + "@docusaurus/theme-live-codeblock": "^2.0.0-beta.9", "@docusaurus/theme-search-algolia": "^2.0.0-beta.9", "@mdx-js/react": "^1.6.21", "clsx": "^1.1.1",