forked from ada-lang-io/ada-lang-io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
297 lines (280 loc) · 8.63 KB
/
docusaurus.config.js
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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const {themes} = require('prism-react-renderer')
const gitHubUserName = "ada-lang-io"
const gitHubProjectName = "ada-lang-io"
const alireDefaultVersion = "v1.2.1"
const alireGitHubLatestRelease = "https://api.github.com/repos/alire-project/alire/releases/latest"
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Ada Programming Language",
tagline: "Readable, correct, performant",
url: "https://ada-lang.io",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: gitHubUserName, // Usually your GitHub org/user name.
projectName: gitHubProjectName, // Usually your repo name.
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
locales: ["en"]
},
customFields: {
description: "A programming language for readable, correct, and performant software."
},
plugins: [
"docusaurus-plugin-sass",
(context, options) => ({
name: "ada-lang-alire-version",
async loadContent() {
try {
const req = await fetch(alireGitHubLatestRelease)
if (req.ok) {
const res = await req.json()
return res.tag_name
}
} catch {
return alireDefaultVersion
}
},
async contentLoaded({ content, actions }) {
const { setGlobalData } = actions
setGlobalData({ alireVersion: content ?? alireDefaultVersion })
}
})
],
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js")
},
blog: false,
theme: {
customCss: require.resolve("./src/css/custom.scss")
}
})
]
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
{
image: "img/ada_logo.svg", // Used for og:image and twitter:iamge
colorMode: {
respectPrefersColorScheme: true
},
navbar: {
logo: {
alt: "Ada",
src: "img/ada_logo.svg",
width: 32,
height: 32
},
hideOnScroll: true,
style: "dark",
items: [
{
type: "doc",
docId: "learn/why-ada",
position: "left",
label: "Learn"
},
{
to: "/docs/arm",
position: "left",
label: "Reference Manual"
},
{
type: "doc",
docId: "style-guide/Ada_Style_Guide",
position: "left",
label: "Style Guide"
},
{
to: "https://forum.ada-lang.io",
position: "right",
label: "Forum"
},
{
type: "doc",
docId: "projects-to-work-on",
position: "left",
label: "Projects to Work on"
},
{
to: "https://usenet.ada-lang.io/comp.lang.ada/",
position: "right",
label: "comp.lang.ada"
},
{
to: "https://search.ada-lang.io",
position: "right",
label: "Code Search"
},
{
// See https://github.com/facebook/docusaurus/issues/7227 for custom components
type: "custom-armAnnotations",
position: "right"
},
{
href: `https://github.com/${gitHubUserName}/${gitHubProjectName}`,
position: "right",
className: "fa-icon header__image header-github-link",
"aria-label": "GitHub repository"
}
]
},
footer: {
style: "dark",
links: [
{
title: "Learning",
items: [
{
label: "Tutorial",
to: "/docs/learn/why-ada"
},
{
label: "Books",
to: "/docs/learn/books"
},
{
label: "Learn Ada (by AdaCore)",
to: "https://learn.adacore.com"
},
{
label: "Learn SPARK (by AdaCore)",
to: "https://learn.adacore.com/courses/intro-to-spark/index.html"
}
]
},
{
title: "Docs",
items: [
{
label: "Reference Manual",
to: "/docs/arm"
},
{
label: "Style Guide",
href: "/docs/style-guide/Ada_Style_Guide"
},
{
label: "Code Search",
href: "https://search.ada-lang.io"
},
{
label: "Reference Card / Cheatsheet",
href: "https://github.com/bracke/AdaReferenceCard/releases"
}
]
},
{
title: "Community",
items: [
{
label: "Forum",
href: "https://forum.ada-lang.io",
className: "fa-icon footer__image footer-discourse-link"
},
{
label: "Stack Overflow",
href: "https://stackoverflow.com/questions/tagged/ada",
className: "fa-icon footer__image footer-stackoverflow-link"
},
{
label: "Reddit",
href: "https://www.reddit.com/r/ada/",
className: "fa-icon footer__image footer-reddit-link"
},
{
label: "Gitter",
href: "https://gitter.im/ada-lang/Lobby",
className: "fa-icon footer__image footer-gitter-link"
},
{
label: "Telegram",
href: "https://t.me/ada_lang",
className: "fa-icon footer__image footer-telegram-link"
},
{
label: "Discord",
href: "https://discord.gg/edM2czVKN4",
className: "fa-icon footer__image footer-discord-link"
},
{
label: "ARG Community Input",
href: "https://arg.adaic.org/community-input"
}
]
},
{
title: "Ecosystem",
items: [
{
label: "Alire (Ada package manager)",
href: "https://alire.ada.dev/"
},
{
label: "Awesome Ada",
href: "https://github.com/ohenley/awesome-ada"
},
{
label: "News, by Ada Planet",
href: "https://ada-planet.blogspot.com/"
},
{
label: "Ada Rapporteur Group",
href: "https://arg.adaic.org/home"
},
{
label: "Ada Europe",
href: "https://ada-europe.org/"
},
{
label: "GitHub",
href: `https://github.com/${gitHubUserName}/${gitHubProjectName}`,
className: "fa-icon footer__image footer-github-link"
}
]
}
],
logo: {
alt: "Alt",
src: "img/ada_logo.svg",
width: 128,
height: 128
},
copyright: `Copyright © ${new Date().getFullYear()} and licensed under Apache 2.0 unless otherwise noted, by the ${gitHubProjectName} developers. Built with <a href="https://docusaurus.io/">Docusaurus</a>.`
},
prism: {
theme: themes.github,
darkTheme: themes.okaidia,
defaultLanguage: "ada",
additionalLanguages: ["ada"]
},
algolia: {
// The application ID provided by Algolia
appId: "L84ZBWQFIW",
// Public API key: it is safe to commit it
apiKey: "3ef66437cc70666c01852b9d2f4fde7b",
indexName: "ada-lang",
// Optional: see doc section below
contextualSearch: true,
// Optional: Algolia search parameters
// See https://www.algolia.com/doc/api-reference/search-api-parameters/
searchParameters: {},
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: "search"
}
}
}
module.exports = config