-
Notifications
You must be signed in to change notification settings - Fork 72
/
docusaurus.config.js
126 lines (125 loc) · 2.99 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
import {themes as prismThemes} from 'prism-react-renderer';
module.exports = {
title: 'ink! documentation',
tagline: 'documentation for ink!',
url: 'https://use.ink',
baseUrl: '/',
onBrokenLinks: 'throw',
favicon: 'img/favicon.png',
organizationName: 'use-ink',
onBrokenLinks: 'warn',
projectName: 'ink-docs',
stylesheets: [
'fonts/fonts.css',
'https://fonts.googleapis.com/css2?family=Fredoka+One&family=Montserrat:wght@400;500;700&display=swap',
],
scripts: [{ src: 'https://apisa.parity.io/latest.js', defer: true }],
plugins: [
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
to: '/ubator',
from: '/inkubator',
},
],
},
],
],
themes: [
[
require.resolve('@easyops-cn/docusaurus-search-local'),
{
indexPages: true,
ignoreFiles: [/3.x/],
language: ['en', 'es'],
},
],
],
themeConfig: {
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.duotoneDark,
additionalLanguages: ['rust', 'json', 'toml'],
},
colorMode: {
defaultMode: 'dark',
disableSwitch: false,
},
navbar: {
title: '',
logo: {
alt: 'ink!',
src: 'img/text-black.svg',
srcDark: '/img/text-white.svg',
},
logo: {
alt: 'ink!',
src: 'img/text-black.svg',
srcDark: '/img/text-white.svg',
},
items: [
{
type: 'docsVersionDropdown',
position: 'right',
dropdownActiveClassDisabled: true,
},
],
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/use-ink/ink-docs/edit/master/',
routeBasePath: '/',
lastVersion: 'current',
versions: {
'6.x': {
label: '6.x',
path: '6.x',
banner: 'none',
},
current: {
label: '5.x',
path: '',
banner: 'none',
},
'4.x': {
label: '4.x',
path: '4.x',
banner: 'none',
},
'3.x': {
label: '3.x',
path: '3.x',
banner: 'none',
},
},
},
blog: {
showReadingTime: true,
editUrl: 'https://github.com/use-ink/ink-docs/edit/master/',
},
theme: {
customCss: [require.resolve('./src/css/custom.css'), require.resolve('./src/css/faucet.css')],
},
},
],
],
plugins: [
async function myPlugin() {
return {
name: 'docusaurus-tailwindcss',
configurePostCss(postcssOptions) {
postcssOptions.plugins.push(require('tailwindcss'))
postcssOptions.plugins.push(require('autoprefixer'))
return postcssOptions
},
}
},
],
}