-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
149 lines (143 loc) · 4.31 KB
/
docusaurus.config.js
File metadata and controls
149 lines (143 loc) · 4.31 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
// @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");
/** @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",
onBrokenMarkdownLinks: "warn",
// 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,
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",
// },
},
},
themes: [
// ... Your other themes.
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
// language: ["en", "fr"],
indexBlog: false,
indexPages: false,
docsRouteBasePath: "/",
},
],
],
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,
},
}),
};
module.exports = config;