forked from fluentlabs-xyz/docs-docusaurus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
213 lines (200 loc) · 6.03 KB
/
docusaurus.config.js
File metadata and controls
213 lines (200 loc) · 6.03 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const baseUrl = process.env.BASE_URL || "/";
console.log(`Using baseUrl: ${baseUrl}`);
/** @type {import('@docusaurus/types').Config} */
module.exports = {
title: "Fluent Docs",
tagline: "Explore Fluent Docs",
url: "https://docs.fluent.org",
baseUrl,
onBrokenLinks: "throw",
onBrokenAnchors: "warn",
onBrokenMarkdownLinks: "warn",
// favicon: 'img/logos/faviconDark.png',
favicon: "img/logos/faviconPurple.png",
organizationName: "Fluent", // Usually your GitHub org/user name.
projectName: "Fluent-docs", // Usually your repo name.
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: "/",
// // Custom sidebars file logic defined here.
// sidebarPath: require.resolve('./sidebars.js'),
// Sidebar plugins documentation:
// https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs
// "sidebarCollapsible: false" forces all sidebars to be open at all times.
// sidebarCollapsible: true,
// "sidebarCollapsed: false" sets all sidebars to open by default. Might be over written in CSS.
sidebarCollapsed: false,
// "Edit this page" will redirect to this defined full GitHub repository with the branch defined as well.
editUrl:
"https://github.com/fluentlabs-xyz/docs-docusaurus/blob/main/",
// Custom admonition types
admonitions: {
keywords: [
"tip",
"prerequisite",
"warning",
"info",
"danger",
"best-practice",
"summary",
],
extendDefaults: true,
},
},
blog: false,
theme: {
customCss: require.resolve("./src/css/custom.scss"),
},
gtag: {
trackingID: process.env.GTM_ID || "GTM-XXXXXXX",
anonymizeIP: true,
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
algolia: {
appId: "AYBP9SCWWP",
apiKey: "f9e8d6400060bd257ff3820e19f13dd6",
indexName: "Fluent Docs",
askAi: "UemcwTGzvIAR",
},
docs: {
sidebar: {
hideable: true,
// // autoCollapseCategories option would collapse all sibling categories when expanding one category.
// // This saves the user from having too many categories open and helps them focus on the selected section.
},
},
imageZoom: {
// CSS selector to apply the plugin to, defaults to '.markdown img'
// selector: '.markdown img',
// Optional medium-zoom options
// see: https://www.npmjs.com/package/medium-zoom#options
options: {
margin: 40,
background: "#000",
scrollOffset: 60,
// container: 'main',
// template: '#zoom-template',
},
},
navbar: {
title: "",
hideOnScroll: true,
logo: {
alt: "Fluent Docs Logo",
// Note: these raw images are scaled down with CSS
// with class .navbar__logo img inside file custom.scss
src: "/img/logos/rectangle.png",
srcDark: "/img/logos/rectangle.png",
},
items: [
{
href: "https://chainlist.org/?search=fluent&testnets=true",
label: "Connect",
position: "left",
// className: 'navbar_item_button',
},
{
href: "https://testnet.fluent.xyz/dev-portal",
label: "Faucet",
position: "left",
// className: 'navbar_item_button',
},
{
href: "https://testnet.fluentscan.xyz/",
label: "Blockscout",
position: "left",
// className: 'navbar_item_button',
},
// {
// href: "https://defillama.com/chain/Ethereum",
// label: "Ecosystem",
// position: "left",
// // className: 'navbar_item_1',
// },
{
href: "https://discord.com/invite/fluentxyz",
label: "Discord",
position: "left",
// className: 'navbar_item_2',
},
{
href: "https://github.com/fluentlabs-xyz/",
label: "GitHub",
position: "right",
},
],
},
footer: {
links: [
{
title: "General",
items: [
{
label: "Home",
to: "https://fluent.xyz",
},
],
},
{
title: "Community",
items: [
{
label: "Discord",
to: "https://discord.com/invite/fluentxyz",
},
],
},
{
title: "Resources",
items: [
{
label: "GitHub",
to: "https://github.com/fluentlabs-xyz/",
},
],
},
],
logo: {
alt: "Fluent Logo",
src: "img/logos/square.png",
href: "https://github.com/fluentlabs-xyz/",
height: 100,
width: 100,
},
},
prism: {
theme: darkCodeTheme,
additionalLanguages: ["solidity", "python", "rust", "bash", "toml"],
},
colorMode: {
defaultMode: "dark",
// Turn light and dark mode theme button on (false) or off (true).
disableSwitch: true,
respectPrefersColorScheme: false,
},
}),
plugins: [
"docusaurus-plugin-sass",
"plugin-image-zoom",
],
// Add custom scripts
scripts: [
{
src: "/js/sidebar-highlight.js",
async: true,
},
],
};