-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
317 lines (310 loc) · 7.37 KB
/
docusaurus.config.js
File metadata and controls
317 lines (310 loc) · 7.37 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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
const lightCodeTheme = require("./src/theme/flureeTheme");
const darkCodeTheme = require("./src/theme/flureeTheme");
// const shiki = require("shiki");
const codeHikeTheme = require("./src/theme/flureeCodeHikeTheme");
const { remarkCodeHike } = require("@code-hike/mdx");
const path = require("node:path");
const remarkSnippetInject = require("./plugins/remark-snippet-inject");
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: "Fluree Developers",
tagline: "Semantic graph data management system built with web3 tech",
url: "https://developers.flur.ee",
baseUrl: "/",
trailingSlash: true,
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
favicon: "img/favicon.ico",
organizationName: "fluree", // GitHub org name.
projectName: "developers-site", // Repo name.
themes: ["@docusaurus/theme-mermaid"],
markdown: {
mermaid: true,
},
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
themeConfig: {
image: "img/FlureeDevsBanner.jpg",
colorMode: {
// light | dark
defaultMode: "light",
// remove default sun-moon icons for dark mode switch
// switchConfig: {
// darkIcon: " ",
// lightIcon: " ",
// },
},
announcementBar: {
id: "new dev site announcement bar",
content:
'Welcome to the new fluree developers site! Try the new search feature to find what you are looking for. You can visit <a href="https://docsarchive.flur.ee" target="_blank">docsarchive.flur.ee</a> for older versions of fluree docs.',
backgroundColor: "#4B56A5",
textColor: "white",
isCloseable: true,
},
navbar: {
// title: 'Fluree',
hideOnScroll: true,
// Main logo which links to fluree marketing site
logo: {
alt: "Fluree Yeti Logo",
src: "img/fluree-logo@3x.png",
srcDark: "img/fluree-logo@3x-white.png",
href: "https://flur.ee",
},
// Navbar links - left aligned
items: [
{
// Home Link
label: "/docs",
to: "/",
position: "left",
className: "navbar-home-link",
},
{
label: "Getting Started",
to: "/getting-started",
docId: "getting-started/index",
type: "doc",
position: "left",
},
{
label: "Learn",
to: "/learn",
docId: "learn/index",
type: "doc",
position: "left",
},
{
label: "Reference",
to: "/reference",
docId: "reference/http-api/index",
type: "doc",
position: "left",
},
{
label: "Examples",
to: "/examples",
docId: "examples/datasets/academic-credentials/introduction",
type: "doc",
position: "left",
},
{
label: "Fluree Cloud",
to: "/cloud",
docId: "cloud/welcome",
type: "doc",
position: "left",
},
{
label: "Fluree Sense",
to: "/sense",
docId: "sense/index",
type: "doc",
position: "left",
},
{
label: "Community",
to: "community/",
position: "left",
},
// Docusaurus template stuff
// { to: '/blog', label: 'Blog', position: 'left' },
// Navbar links - right aligned
{
href: "https://data.flur.ee/",
label: "Get Started Free",
position: "right",
},
// {
// href: "https://github.com/fluree/developers-site",
// className: "header-github-link",
// position: "right",
// "aria-label": "Github repository",
// },
],
},
// Config for collapsing sidebar
docs: {
sidebar: {
hideable: true,
},
},
footer: {
style: "dark",
logo: {
alt: "Fluree Yeti Logo",
src: "img/fluree-logo.png",
href: "https://flur.ee",
},
copyright: `
Copyright © ${new Date().getFullYear()} Fluree, PBC.
Built with Docusaurus, Diataxis, and ♥️.
`,
links: [
{
title: "Docs",
items: [
{
label: "Learn",
to: "/docs/learn/",
},
{
label: "Examples",
to: "docs/examples/home/",
},
{
label: "Reference",
to: "/docs/reference/http-api/",
},
{
label: "Fluree Cloud",
to: "/docs/cloud/welcome",
},
],
},
{
title: "Community",
items: [
{
label: "Discord",
href: "https://discord.gg/pgjsvPa9Nm",
},
{
label: "Twitter",
href: "https://twitter.com/flureepbc",
},
],
},
{
title: "Media",
items: [
{
label: "Blog",
href: "https://flur.ee/blog",
},
{
label: "YouTube",
href: "https://youtube.com/c/fluree",
},
{
label: "Dev.to",
href: "https://dev.to/fluree",
},
{
label: "GitHub",
href: "https://github.com/fluree",
},
],
},
],
},
// Config for themeing syntax highlighting
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ["turtle", "sparql", "clojure", "http", "xml-doc"],
},
algolia: {
apiKey: "4c0aaa58c68d9cf5b2bf2da86d6579b5",
appId: "V5ALV77PN7",
indexName: "prod_dev_site",
},
baseUrlIssueBanner: false, // Defaults to `true`,
mermaid: {
theme: { light: "base", dark: "base" }, // must be an object
options: {
themeVariables: {
primaryColor: "#c6d4ff",
primaryBorderColor: "#c6d4ff",
lineColor: "#c6d4ff",
secondaryColor: "#d5f5f6",
secondaryTextColor: "#fef4ff",
tertiaryColor: "#fff",
},
}
},
},
presets: [
[
"@docusaurus/preset-classic",
/** @type {import('@docusaurus/preset-classic').Options} */
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// editUrl: "https://github.com/fluree/developers-site/edit/main/",
beforeDefaultRemarkPlugins: [
[
remarkSnippetInject,
{ snippetsDir: path.join(__dirname, "snippets") },
],
[
remarkCodeHike,
{
lineNumbers: false,
showCopyButton: true,
theme: codeHikeTheme,
skipLanguages: ["mermaid"],
autoImport: true,
},
],
],
},
gtag:
process.env.NODE_ENV === "production"
? {
trackingID: "G-XDLKYE388T",
anonymizeIP: true,
}
: false,
// blog: {
// showReadingTime: true,
// // TODO: Please change this to your repo.
// editUrl:
// 'https://github.com/fluree/docs.flur.ee',
// // editUrl:
// // 'https://github.com/fluree/docs.flur.ee/edit/master/website/blog/',
// },
theme: {
customCss: [
require.resolve("@code-hike/mdx/styles.css"),
require.resolve("./src/css/custom.css"),
],
},
},
],
],
plugins: [
async function myPlugin(context, options) {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
// Appends TailwindCSS and AutoPrefixer.
postcssOptions.plugins.push(require("tailwindcss"));
postcssOptions.plugins.push(require("autoprefixer"));
return postcssOptions;
},
};
},
[
"@docusaurus/plugin-ideal-image",
{
quality: 70,
max: 1030, // max resized image's size.
min: 640, // min resized image's size. if original is lower, use that size.
steps: 2, // the max number of images generated between min and max (inclusive)
disableInDev: false,
},
],
],
scripts: [
{
// Object format.
src: "/scripts/reo.js",
async: true,
// onLoad:
// typeof window !== "undefined" &&
// window.Reo &&
// window.Reo.init({ clientID: "cb8a71410d7f8f8" }),
},
],
};