-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
132 lines (126 loc) · 3.46 KB
/
docusaurus.config.js
File metadata and controls
132 lines (126 loc) · 3.46 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// @ts-check
// Ensure content is generated
require("./generate")();
const { themes } = require("prism-react-renderer");
const darkCodeTheme = themes.vsDark;
/** @type {import("prism-react-renderer").PrismTheme} */
const lightCodeTheme = themes.vsLight;
lightCodeTheme.plain.color = "rgb(28, 30, 33)"; // from CSS --font-color-base-rgb
lightCodeTheme.plain.backgroundColor = "#ffffff";
const organizationName = "microsoft";
const projectName = "rnx-kit";
const githubUrl = "https://github.com/" + organizationName + "/" + projectName;
const mainReadmeUrl = githubUrl + "/#readme";
const mainBranchUrl = githubUrl + "/tree/main";
const docsiteUrl = mainBranchUrl + "/docsite";
const title1 = "React Native";
const title2 = "Developer Tools";
/** @type {import('@docusaurus/types').Config} */
module.exports = {
title: title1 + " " + title2,
url: "https://" + organizationName + ".github.io",
baseUrl: "/" + projectName + "/",
favicon: "img/favicon.ico",
trailingSlash: false,
future: {
v4: true,
},
onBrokenLinks: "throw",
tagline: "Tools to boost your productivity. By and for the community.",
organizationName,
projectName,
deploymentBranch: "gh-pages",
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: projectName,
logo: {
alt: "react native logo",
src: "img/react-logo.svg",
},
items: [
{
type: "doc",
docId: "introduction",
position: "right",
label: "Docs",
},
{
type: "doc",
docId: "tools/overview",
position: "right",
label: "Tools",
},
{
type: "doc",
docId: "architecture/overview",
position: "right",
label: "Architecture",
},
{
type: "doc",
docId: "community",
position: "right",
label: "Community",
},
{
type: "doc",
docId: "contributing",
position: "right",
label: "Contributing",
},
{
label: "Blog",
position: "right",
href: "https://devblogs.microsoft.com/react-native/",
},
{
src: "img/github-logo.svg",
href: mainReadmeUrl,
className: "github-mark-24px",
position: "right",
"aria-label": "GitHub repository",
},
],
},
footer: {
logo: {
src: "img/msoss-light.png",
srcDark: "img/msoss-dark.png",
alt: "Microsoft Open Source logo",
href: "https://opensource.microsoft.com",
},
copyright: `Copyright © ${new Date().getFullYear()} Microsoft`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
plugins: [require.resolve("docusaurus-lunr-search")],
presets: [
[
"@docusaurus/preset-classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
breadcrumbs: false,
sidebarPath: require.resolve("./sidebars.js"),
sidebarCollapsed: false,
editUrl: docsiteUrl + "/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
],
customFields: {
title1,
title2,
},
markdown: {
format: "detect",
},
};