forked from cosmos/interchain-security
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
218 lines (210 loc) · 6.83 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
// @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: "Interchain Security",
tagline:
"Interchain Security is a project to build a security layer for the Cosmos ecosystem.",
url: "https://cosmos.github.io",
baseUrl: "/interchain-security/",
onBrokenLinks: "warn",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.svg",
trailingSlash: false,
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "cosmos",
projectName: "interchain-security",
// 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"],
},
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
routeBasePath: "/",
versions: {
current: {
path: "/",
// banner: "current",
},
},
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: "img/banner.jpg",
docs: {
sidebar: {
autoCollapseCategories: true,
},
},
colorMode: {
defaultMode: 'dark',
disableSwitch: true,
respectPrefersColorScheme: false,
},
navbar: {
title: "Interchain Security",
hideOnScroll: false,
// logo: {
// alt: "Interchain Security Logo",
// src: "img/logo-sdk.svg",
// href: "/",
// target: "_self",
// },
items: [
{
href: "https://github.com/cosmos/interchain-security",
html: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="github-icon">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 0.300049C5.4 0.300049 0 5.70005 0 12.3001C0 17.6001 3.4 22.1001 8.2 23.7001C8.8 23.8001 9 23.4001 9 23.1001C9 22.8001 9 22.1001 9 21.1001C5.7 21.8001 5 19.5001 5 19.5001C4.5 18.1001 3.7 17.7001 3.7 17.7001C2.5 17.0001 3.7 17.0001 3.7 17.0001C4.9 17.1001 5.5 18.2001 5.5 18.2001C6.6 20.0001 8.3 19.5001 9 19.2001C9.1 18.4001 9.4 17.9001 9.8 17.6001C7.1 17.3001 4.3 16.3001 4.3 11.7001C4.3 10.4001 4.8 9.30005 5.5 8.50005C5.5 8.10005 5 6.90005 5.7 5.30005C5.7 5.30005 6.7 5.00005 9 6.50005C10 6.20005 11 6.10005 12 6.10005C13 6.10005 14 6.20005 15 6.50005C17.3 4.90005 18.3 5.30005 18.3 5.30005C19 7.00005 18.5 8.20005 18.4 8.50005C19.2 9.30005 19.6 10.4001 19.6 11.7001C19.6 16.3001 16.8 17.3001 14.1 17.6001C14.5 18.0001 14.9 18.7001 14.9 19.8001C14.9 21.4001 14.9 22.7001 14.9 23.1001C14.9 23.4001 15.1 23.8001 15.7 23.7001C20.5 22.1001 23.9 17.6001 23.9 12.3001C24 5.70005 18.6 0.300049 12 0.300049Z" fill="currentColor"/>
</svg>
`,
position: "right",
},
{
type: "docsVersionDropdown",
position: "left",
dropdownActiveClassDisabled: true,
},
],
},
footer: {
links: [
{
items: [
{
html: `<a href="https://cosmos.network"><img src="/img/logo-bw.svg" alt="Cosmos Logo"></a>`,
},
],
},
{
title: "Documentation",
items: [
{
label: "Cosmos Hub",
href: "https://hub.cosmos.network",
},
{
label: "Cosmos SDK",
href: "https://docs.cosmos.network",
},
{
label: "Tendermint Core",
href: "https://docs.tendermint.com",
},
{
label: "IBC Go",
href: "https://ibc.cosmos.network",
},
],
},
{
title: "Community",
items: [
{
label: "Blog",
href: "https://blog.cosmos.network",
},
{
label: "Forum",
href: "https://forum.cosmos.network",
},
{
label: "Discord",
href: "https://discord.gg/cosmosnetwork",
},
{
label: "Reddit",
href: "https://reddit.com/r/cosmosnetwork",
},
],
},
{
title: "Social",
items: [
{
label: "Discord",
href: "https://discord.gg/cosmosnetwork",
},
{
label: "Twitter",
href: "https://twitter.com/cosmos",
},
{
label: "Youtube",
href: "https://www.youtube.com/c/CosmosProject",
},
{
label: "Telegram",
href: "https://t.me/cosmosproject",
},
],
},
],
copyright: "Informal Systems",
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ["protobuf", "go-module"], // https://prismjs.com/#supported-languages
},
// algolia: {
// appId: "QLS2QSP47E",
// apiKey: "4d9feeb481e3cfef8f91bbc63e090042",
// indexName: "cosmos_network",
// contextualSearch: false,
// },
}),
themes: ["@you54f/theme-github-codeblock"],
plugins: [
async function myPlugin(context, options) {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
postcssOptions.plugins.push(require("postcss-import"));
postcssOptions.plugins.push(require("tailwindcss/nesting"));
postcssOptions.plugins.push(require("tailwindcss"));
postcssOptions.plugins.push(require("autoprefixer"));
return postcssOptions;
},
};
},
// [
// "@docusaurus/plugin-google-analytics",
// {
// trackingID: "UA-51029217-2",
// anonymizeIP: true,
// },
// ],
[
"@docusaurus/plugin-client-redirects",
{
fromExtensions: ["html"],
toExtensions: ["html"],
redirects: [
{
from: ["/", "/main", "/master"],
to: "/",
},
],
},
],
],
};
module.exports = config;