-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
143 lines (130 loc) · 3.75 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
143 lines (130 loc) · 3.75 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
// @ts-check
import {themes as prismThemes} from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'MASQ Network Documentation',
tagline: 'MASQ Network documentation',
favicon: 'img/favicon.ico',
future: {
v4: true,
},
url: 'https://docs.masqbrowser.com',
baseUrl: '/',
organizationName: 'MASQ-Project',
projectName: 'masq-docs',
deploymentBranch: 'gh-pages',
trailingSlash: false,
onBrokenLinks: 'warn',
markdown: {
hooks: {
onBrokenMarkdownLinks: 'warn',
onBrokenMarkdownImages: 'warn',
},
},
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: '/',
sidebarPath: './sidebars.js',
breadcrumbs: false,
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
plugins: [
[
'@docusaurus/plugin-client-redirects',
/** @type {import('@docusaurus/plugin-client-redirects').Options} */
({
// Explicit maps for paths that no longer exist as live pages
redirects: [
{to: '/', from: '/masq'},
{
to: '/advanced-use/masq-node-from-cli/configuration-methods',
from: [
'/advanced-use/masq-node-from-cli/untitled-1',
'/masq/advanced-use/masq-node-from-cli/untitled-1',
],
},
{
to: '/advanced-use/common-challenges/user-permissions-real-user',
from: [
'/advanced-use/common-challenges/untitled-2',
'/masq/advanced-use/common-challenges/untitled-2',
],
},
{
to: '/advanced-use/common-challenges/port-53-problems',
from: [
'/advanced-use/common-challenges/untitled-3',
'/masq/advanced-use/common-challenges/untitled-3',
],
},
],
createRedirects(existingPath) {
/** @type {string[]} */
const from = [];
// Homepage handled via explicit redirect (/masq).
// Do not also emit /masq/ — same stub file on disk (esp. Windows).
if (existingPath !== '/') {
from.push(`/masq${existingPath}`);
}
// Privacy-browser folder renames (with and without /masq prefix)
if (existingPath.startsWith('/masq-privacy-browser')) {
const web3Path = existingPath
.replace('/masq-privacy-browser', '/masq-web3-privacy-browser')
.replace('/updating-masq-browser', '/updating-masq-web3-browser');
from.push(web3Path, `/masq${web3Path}`);
}
return from.length > 0 ? from : undefined;
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: 'img/masq-social-card.jpg',
colorMode: {
respectPrefersColorScheme: true,
},
navbar: {
title: 'MASQ Docs',
logo: {
alt: 'MASQ',
src: 'img/logo.png',
href: '/',
},
items: [
{
href: 'https://www.masqbrowser.com/downloads',
label: 'Download MASQ Now',
position: 'right',
},
{
href: 'https://github.com/MASQ-Project',
position: 'right',
className: 'header-github-link',
'aria-label': 'MASQ on GitHub',
},
],
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['bash', 'json', 'rust'],
},
}),
};
export default config;