From eb8e93e666bafe6f1c6039126be856a5256f004e Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Tue, 16 Jul 2024 10:18:11 -0700 Subject: [PATCH] revert docusaurus.config.js changes --- docusaurus.config.js | 59 +++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 34 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index ccfc7f311b2..d61ebe39b49 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -27,7 +27,7 @@ const config = { // to replace "en" with "zh-Hans". i18n: { defaultLocale: "en", - locales: ["en" /*, "zh", "ko"*/], + locales: ["en"/*, "zh", "ko"*/], }, customFields: { @@ -37,14 +37,8 @@ const config = { trailingSlash: true, scripts: [ - { - src: "https://cmp.osano.com/AzZMxHTbQDOQD8c1J/a2e89f0e-f467-4542-bfea-30ea2c1a6648/osano.js", - }, - { - src: "https://plausible.io/js/script.js", - defer: true, - "data-domain": "docs.metamask.io", - }, + { src: "https://cmp.osano.com/AzZMxHTbQDOQD8c1J/a2e89f0e-f467-4542-bfea-30ea2c1a6648/osano.js" }, + { src: "https://plausible.io/js/script.js", defer: true, "data-domain": "docs.metamask.io" }, { src: "/js/feedback-script.js", defer: true, async: true }, { src: "/js/getfeedback.js", defer: true, async: true }, ], @@ -66,17 +60,13 @@ const config = { breadcrumbs: false, editUrl: "https://github.com/MetaMask/metamask-docs/edit/main/", remarkPlugins: [ - [ - remarkCodesandbox, - { - mode: "iframe", - autoDeploy: process.env.NODE_ENV === "production", - }, - ], + [remarkCodesandbox, { + mode: "iframe", + autoDeploy: process.env.NODE_ENV === "production", + }], ], openrpc: { - openrpcDocument: - "https://metamask.github.io/api-specs/0.9.3/openrpc.json", + openrpcDocument: "https://metamask.github.io/api-specs/0.9.3/openrpc.json", path: "reference", sidebarLabel: "JSON-RPC API", }, @@ -90,7 +80,7 @@ const config = { plugins: [ [ "@docusaurus/plugin-content-docs", - { + ({ id: "snaps", path: "snaps", routeBasePath: "snaps", @@ -111,7 +101,7 @@ const config = { "flaskOnly", ], }, - }, + }), ], [ "@docusaurus/plugin-content-docs", @@ -147,22 +137,23 @@ const config = { }, ], "./src/plugins/plugin-json-rpc.ts", - isProd - ? [ - "docusaurus-plugin-segment", - { - apiKey: process.env.SEGMENT_ANALYTICS_KEY, - load: { cookie: { sameSite: "None", secure: true } }, - page: true, - }, - ] - : null, + isProd ? + [ + "docusaurus-plugin-segment", + { + apiKey: process.env.SEGMENT_ANALYTICS_KEY, + load: { cookie: { sameSite: "None", secure: true } }, + page: true, + }, + ] : null, "./src/plugins/launchdarkly", ], themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ - image: "img/metamaskog.jpeg", + metadata: [ + { name: "og:image", content: "/img/metamaskog.jpeg" }, + ], navbar: { title: " │ ‎ Documentation", logo: { @@ -314,7 +305,7 @@ const config = { }, prism: { theme: codeTheme, - additionalLanguages: ["csharp", "gradle", "bash", "json"], + additionalLanguages: ["csharp","gradle","bash","json"], }, algolia: { // The application ID provided by Algolia @@ -333,7 +324,7 @@ const config = { // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs replaceSearchResultPathname: { - from: "/", + from: "/", to: process.env.DEST || "/", }, @@ -362,4 +353,4 @@ const config = { }), }; -module.exports = config; +module.exports = config; \ No newline at end of file