Add Sandy to internal documentation

Summary:
Scaffolded some internal Sandy notes and made them only internally available.

Since most of the pipeline was already set up by jknoxville, it is unclear to me if something needs to be done to set up the auto redirect from fbflipper.com

Reviewed By: jknoxville

Differential Revision: D22233534

fbshipit-source-id: 4bdf5535f5745e7e4d335647759c6cf1b7cc73c6
This commit is contained in:
Michel Weststrate
2020-07-01 08:58:40 -07:00
committed by Facebook GitHub Bot
parent bde112bf85
commit c902a27bce
2 changed files with 37 additions and 8 deletions

View File

@@ -7,17 +7,22 @@
* @format * @format
*/ */
function FBInternalWithOssFallback(elements, fallback) {
return process.env.FB_INTERNAL ? elements : fallback;
}
const repoUrl = 'https://github.com/facebook/flipper'; const repoUrl = 'https://github.com/facebook/flipper';
const siteConfig = { const siteConfig = {
title: 'Flipper', title: FBInternalWithOssFallback('Flipper @FB', 'Flipper'),
tagline: 'Extensible mobile app debugging', tagline: 'Extensible mobile app debugging',
url: 'https://fbflipper.com/', url: FBInternalWithOssFallback('https://flipper.thefacebook.com/', 'https://fbflipper.com/'),
baseUrl: '/', baseUrl: '/',
projectName: 'flipper', projectName: 'flipper',
// TODO: T69061026 enable once sandy docs are complete: external_domain: 'fbflipper.com',
themeConfig: { themeConfig: {
navbar: { navbar: {
title: 'Flipper', title: FBInternalWithOssFallback('Flipper @FB', 'Flipper'),
logo: { logo: {
alt: 'Flipper Logo', alt: 'Flipper Logo',
src: 'img/icon.png', src: 'img/icon.png',
@@ -65,13 +70,13 @@ const siteConfig = {
title: "I'm a dolphin not a whale!", title: "I'm a dolphin not a whale!",
}, },
}, },
algolia: { algolia: FBInternalWithOssFallback(undefined, {
apiKey: '2df980e7ffc95c19552790f7cad32666', apiKey: '2df980e7ffc95c19552790f7cad32666',
indexName: 'fbflipper', indexName: 'fbflipper',
algoliaOptions: { algoliaOptions: {
hitsPerPage: 5, hitsPerPage: 5,
}, },
}, }),
prism: { prism: {
additionalLanguages: ['groovy', 'java', 'kotlin', 'ruby', 'swift'], additionalLanguages: ['groovy', 'java', 'kotlin', 'ruby', 'swift'],
}, },
@@ -93,7 +98,7 @@ const siteConfig = {
{ {
docs: { docs: {
path: '../docs', path: '../docs',
sidebarPath: require.resolve('./sidebars.json'), sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/facebook/flipper/blob/master/website', editUrl: 'https://github.com/facebook/flipper/blob/master/website',
}, },
theme: { theme: {

View File

@@ -1,4 +1,25 @@
{ /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
/**
Adds content only if building internal FB version of documentations
e.g. ...FBInternalOnly({'sected-id'})
*/
function FBInternalOnly(elements) {
return process.env.FB_INTERNAL ? elements : [];
}
function NotInFBInternal(elements) {
return process.env.FB_INTERNAL ? [] : elements;
}
module.exports = {
"features": { "features": {
"Features": [ "Features": [
"features/index", "features/index",
@@ -68,7 +89,10 @@
"extending/send-data", "extending/send-data",
"extending/error-handling", "extending/error-handling",
"extending/testing", "extending/testing",
"extending/debugging" "extending/debugging",
...FBInternalOnly([ // TODO: Remove once sandy is public T69061061
"extending/fb/sandy/sandy-plugins"
])
], ],
"Other Platforms": [ "Other Platforms": [
"extending/new-clients", "extending/new-clients",