Fix loading of google anaytics script

Summary:
Flipper docs were loading really slowly and I found in dev tools that was becuase of requests to scripts specified in docusaurus config which were not found because of relative urls used. This diff fixes that by specifying absolute URL for script loading.
{F696549860}

Reviewed By: jknoxville

Differential Revision: D33845659

fbshipit-source-id: 5079dba442f5fdf4b4f3b2a64146535b39ea72a4
This commit is contained in:
Anton Nikolaev
2022-01-28 09:46:12 -08:00
committed by Facebook GitHub Bot
parent b4fc108c2e
commit f3869bc575

View File

@@ -12,16 +12,17 @@ const {fbContent, fbInternalOnly} = require('internaldocs-fb-helpers');
// end-import-example
const repoUrl = 'https://github.com/facebook/flipper';
const siteUrl = fbContent({
internal: 'https://flipper.thefacebook.com/',
external: 'https://fbflipper.com/',
});
const siteConfig = {
title: fbContent({
internal: 'Flipper @FB',
external: 'Flipper',
}),
tagline: 'Extensible mobile app debugging',
url: fbContent({
internal: 'https://flipper.thefacebook.com/',
external: 'https://fbflipper.com/',
}),
url: siteUrl,
baseUrl: '/',
trailingSlash: true,
projectName: 'flipper',
@@ -160,8 +161,8 @@ const siteConfig = {
scripts: [
'https://buttons.github.io/buttons.js',
'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js',
'js/code-blocks-buttons.js',
'js/google-analytics.js',
`${siteUrl}js/code-blocks-buttons.js`,
`${siteUrl}js/google-analytics.js`,
],
stylesheets: [],
// start_config_example