-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
siteConfig.js
112 lines (109 loc) · 3.15 KB
/
siteConfig.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/**
* 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.
*/
const RemarkablePlugins = require('./core/RemarkablePlugins');
const users = require('./showcase.json');
let communityRepos = [];
try {
communityRepos = require('./community-repos.json');
} catch (e) {
// We don't care if there are no repos synced locally
// We only care if we are on the CI server and about to deploy
}
const defaultVersionShown = '0.63';
const baseUrl = '/';
const repoUrl = 'https://github.com/facebook/react-native';
const siteConfig = {
title: 'React Native',
tagline: 'A framework for building native apps using React',
url: 'https://reactnative.dev',
baseUrl,
projectName: 'react-native',
cname: 'reactnative.dev',
repoUrl,
defaultVersionShown,
users,
communityRepos,
editUrl: 'https://github.com/facebook/react-native-website/blob/master/docs/',
headerLinks: [
{doc: 'getting-started', label: 'Docs'},
{doc: 'components-and-apis', label: 'Components'},
{doc: 'accessibilityinfo', label: 'API'},
{page: 'help', label: 'Community'},
{blog: true, label: 'Blog'},
{search: true},
{href: repoUrl, label: 'GitHub'},
],
headerIcon: 'img/header_logo.svg',
footerIcon: 'img/header_logo.png',
favicon: 'img/favicon.ico',
colors: {
brand: '#61dafb', // electric blue
dark: '#282c34', // dark blue
deepdark: '#20232a', // really dark blue
light: '#373940', // light blue
text: '#1a1a1a', // black substitute
subtle: '#6d6d6d', // light grey for text
divider: '#ececec', // very light grey
tintColor: '#f7f7f7', // slightly off white
backgroundColor: 'white',
// we don't use these any more but docusaurus complains if we don't
primaryColor: 'black',
secondaryColor: 'gray',
},
blogSidebarCount: 'ALL',
algolia: {
apiKey: '2c98749b4a1e588efec53b2acec13025',
indexName: 'react-native-versions',
algoliaOptions: {
facetFilters: ['tags:VERSION'],
hitsPerPage: 5,
},
},
facebookAppId: '1677033832619985',
twitter: 'reactnative',
twitterImage: 'img/logo-og.png',
ogImage: 'img/logo-og.png',
markdownPlugins: [
RemarkablePlugins.SnackPlayer,
RemarkablePlugins.ReactNativeWebPlayer,
],
usePrism: [
'javascript',
'js',
'jsx',
'java',
'objective-c',
'json',
'sh',
'tsx',
],
highlight: {
theme: 'solarized-dark',
},
gaTrackingId: 'UA-41298772-2',
scripts: [
'https://cdn.jsdelivr.net/npm/focus-visible@5.0.2/dist/focus-visible.min.js',
'https://snack.expo.io/embed.js',
'https://platform.twitter.com/widgets.js',
'https://buttons.github.io/buttons.js',
baseUrl + 'js/codeblocks.js',
baseUrl + 'js/tabs.js',
baseUrl + 'js/docs-rating.js',
baseUrl + 'js/announcement.js',
baseUrl + 'js/survey-banner.js',
],
cleanUrl: true,
scrollToTop: true,
scrollToTopOptions: {
zIndex: 100,
},
docsSideNavCollapsible: true,
onPageNav: 'separate',
slugPreprocessor: baseSlug =>
baseSlug.replace(/<([^>]+?)([^>]*?)>(.*?)<\/\1>/gi, ''),
};
module.exports = siteConfig;