-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathdocusaurus.config.ts
137 lines (119 loc) · 3.31 KB
/
docusaurus.config.ts
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
import type * as Preset from "@docusaurus/preset-classic";
import type { Config } from "@docusaurus/types";
import { themes } from "prism-react-renderer";
const lightCodeTheme = themes.github;
const darkCodeTheme = themes.vsDark;
const config: Config = {
title: "IsaacScript",
tagline: undefined,
favicon: "img/favicon.ico",
url: "https://isaacscript.github.io",
baseUrl: "/",
organizationName: "IsaacScript",
projectName: "IsaacScript.github.io",
onBrokenAnchors: "ignore", // This has false positives, so we have to ignore it.
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
onDuplicateRoutes: "throw",
i18n: {
defaultLocale: "en",
locales: ["en"],
},
presets: [
[
"classic",
{
docs: {
routeBasePath: "/", // Serve the docs at the site's root.
sidebarPath: "./sidebars.ts",
editUrl:
"https://github.com/IsaacScript/isaacscript/edit/main/packages/docs",
},
theme: {
customCss: "./src/css/custom.css",
},
} satisfies Preset.Options,
],
],
themeConfig: {
navbar: {
title: "IsaacScript",
logo: {
alt: "IsaacScript Logo",
src: "img/isaacscript-logo.png",
},
items: [
{ to: "main/features", label: "Main", position: "left" },
{
to: "isaac-typescript-definitions",
label: "isaac-typescript-definitions",
position: "left",
},
{
to: "isaacscript-common",
label: "isaacscript-common",
position: "left",
},
{
to: "eslint-config-isaacscript",
label: "eslint-config-isaacscript",
position: "left",
},
{
href: "https://github.com/IsaacScript/isaacscript",
className: "header-github-link",
position: "right",
},
{
href: "https://discord.gg/KapmKQ2gUD",
className: "header-discord-link",
position: "right",
},
{
href: "https://wofsauge.github.io/IsaacDocs/rep/",
className: "header-wof-link",
position: "right",
},
],
},
footer: undefined,
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ["lua"],
},
typesense: {
typesenseCollectionName: "isaacscript",
typesenseServerConfig: {
nodes: [
{
host: "isaacracing.net",
port: 8108,
protocol: "https",
},
],
apiKey: "9AiKF0AGD145wC9fc4NafATcCam89XT7v2NxGf2ymFucN7b6",
},
// https://typesense.org/docs/0.21.0/api/search.md#search-parameters
typesenseSearchParameters: {
split_join_tokens: "always",
},
// https://docusaurus.io/docs/search#contextual-search
contextualSearch: true,
},
colorMode: {
defaultMode: "dark",
},
} satisfies Preset.ThemeConfig,
// -------------------------
// Added fields from vanilla
// -------------------------
// Needed so that the following text works properly: `1 << -1 (0)`
// https://github.com/tgreyuk/typedoc-plugin-markdown/issues/502
markdown: {
format: "detect",
},
scripts: ["/js/hotkey.js"],
themes: ["docusaurus-theme-search-typesense"],
};
export default config;