diff --git a/docusaurus.config.js b/docusaurus.config.js index df09a5cdd9c..4c67292f8fb 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -21,6 +21,9 @@ const embedDropdown = fs.readFileSync('./src/components/NavDropdown/EmbedMetaMas const extendDropdown = fs.readFileSync('./src/components/NavDropdown/ExtendScale.html', 'utf-8') const npm2yarnPlugin = [require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }] /** @type {import('@docusaurus/types').Config} */ +const siteUrl = 'https://docs.metamask.io' +const baseUrl = process.env.DEST || '/' +const fullUrl = new URL(baseUrl, siteUrl).toString() const config = { title: 'MetaMask developer documentation', // tagline: '', @@ -28,7 +31,59 @@ const config = { baseUrl: process.env.DEST || '/', // overwritten in github action for staging / latest onBrokenLinks: 'warn', onBrokenMarkdownLinks: 'warn', - favicon: 'img/metamask-fox.svg', + favicon: 'img/favicons/favicon-96x96.png', + + headTags: [ + { + tagName: 'link', + attributes: { + rel: 'icon', + type: 'image/png', + sizes: '96x96', + href: 'img/favicons/favicon-96x96.png', + }, + }, + { + tagName: 'link', + attributes: { + rel: 'icon', + type: 'image/png', + sizes: '192x192', + href: 'img/favicons/web-app-manifest-192x192.png', + }, + }, + { + tagName: 'link', + attributes: { + rel: 'icon', + type: 'image/png', + sizes: '512x512', + href: 'img/favicons/web-app-manifest-512x512.png', + }, + }, + { + tagName: 'link', + attributes: { + rel: 'apple-touch-icon', + sizes: '180x180', + href: 'img/favicons/apple-touch-icon.png', + }, + }, + { + tagName: 'script', + attributes: { + type: 'application/ld+json', + }, + innerHTML: ` + { + "@context": "https://schema.org", + "@type": "Organization", + "url": "${fullUrl}", + "logo": "${new URL('img/favicons/favicon-96x96.png', fullUrl).toString()}" + } + `, + }, + ], // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. diff --git a/static/img/favicons/apple-touch-icon.png b/static/img/favicons/apple-touch-icon.png new file mode 100644 index 00000000000..c09d545d415 Binary files /dev/null and b/static/img/favicons/apple-touch-icon.png differ diff --git a/static/img/favicons/favicon-96x96.png b/static/img/favicons/favicon-96x96.png new file mode 100644 index 00000000000..3df3df1d4ff Binary files /dev/null and b/static/img/favicons/favicon-96x96.png differ diff --git a/static/img/favicons/web-app-manifest-192x192.png b/static/img/favicons/web-app-manifest-192x192.png new file mode 100644 index 00000000000..dcb70cffa76 Binary files /dev/null and b/static/img/favicons/web-app-manifest-192x192.png differ diff --git a/static/img/favicons/web-app-manifest-512x512.png b/static/img/favicons/web-app-manifest-512x512.png new file mode 100644 index 00000000000..5fb1f861e6d Binary files /dev/null and b/static/img/favicons/web-app-manifest-512x512.png differ