-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
161 lines (153 loc) · 4.74 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
161 lines (153 loc) · 4.74 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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const { themes } = require("prism-react-renderer");
const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Bloom Docs",
staticDirectories: ["static"],
tagline: "Let's grow a library",
url: "https://docs.bloomlibrary.org",
baseUrl: "/",
onBrokenLinks: "throw",
// Duplicate routes cause the next/prev buttons to loop
// which causes the pdf creation to loop forever.
onDuplicateRoutes: "throw",
favicon: "img/favicon.ico",
organizationName: "BloomBooks",
projectName: "bloom-docs",
trailingSlash: true,
markdown: {
mdx1Compat: {
comments: false,
admonitions: false,
headingIds: false,
},
hooks: {
onBrokenMarkdownLinks: "warn"
}
},
plugins: ["@docusaurus/plugin-ideal-image"],
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: "/", // Serve the docs at the site's root
sidebarPath: undefined, // `undefined` to create a fully autogenerated sidebar.
admonitions: {
// https://github.com/elviswolcott/remark-admonitions
/* I couldn't get an svg with a <text/> to work, and I don't want all the other icons to switch to the emoji version, and remark-admonitions doesn't allow
for a fallback from svg to emoji if svg is missing, and I wasn't able to get a patch to remark-admonitions to get used by docusaurus. Sigh.
customTypes: {
construction: {
ifmClass: "xx",
keyword: "yy",
emoji: "🚧",
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"> <text x="0" y="15">🚧</text></svg>',
},
},
*/
},
},
blog: false,
theme: {
customCss: [
require.resolve("./css/docu-notion-styles.css"),
require.resolve("./src/css/custom.css"),
],
},
gtag: {
trackingID: "G-QCEC01ZX3Y",
anonymizeIP: true,
},
}),
],
],
i18n: {
defaultLocale: "en",
locales: ["en"],
// For now, we don't have enough translated to justify shipping other languages.
// When we start building these again, there are other changes needed in the GHA
// workflows to reenable the Crowdin downloads.
// locales: ["en", "fr", "es"],
localeConfigs: {
en: {
label: "English",
direction: "ltr",
htmlLang: "en-US",
calendar: "gregory",
},
// fr: {
// label: "français",
// direction: "ltr",
// htmlLang: "fr",
// calendar: "gregory",
// },
// es: {
// label: "español",
// direction: "ltr",
// htmlLang: "es",
// calendar: "gregory",
// },
},
},
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
metadata: [
{
name: "keywords",
content: "Bloom, SIL, documentation, help, training",
},
],
sitemap: {
// https://www.sitemaps.org/protocol.html#xmlTagDefinitions
changefreq: "weekly",
priority: 0.5,
ignorePatterns: [],
},
navbar: {
title: "Bloom Docs",
logo: {
alt: "Bloom Site Logo",
src: "img/logo.svg",
},
items: [
{
type: "doc",
label: "PDF Downloads",
position: "right",
docId: "downloads",
},
// As of Aug 2023, we don't really have enough translation done to warrant having a locale chooser.
// {
// type: "localeDropdown",
// position: "right",
// },
],
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
algolia: {
appId: "FI2OI4JBTP",
apiKey: "757ac6eee61ab3ec243a43510136269b",
indexName: "bloom",
// contextualSearch "ensures that search results are relevant to the current language and version".
// Disabled: because it gives 0 results. Maybe something isn't set up right on Algolia's side. TODO: see https://docusaurus.io/docs/search#algolia-no-search-results
contextualSearch: false,
searchParameters: {},
askAi: {
assistantId: "BrDlTKUo3zcu", // this is the gemini 2.5 flash lite on
indexName: "bloom-markdown",
apiKey: "757ac6eee61ab3ec243a43510136269b",
appId: "FI2OI4JBTP",
},
},
}),
};
module.exports = config;