-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocusaurus.config.ts
105 lines (96 loc) · 2.8 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
import { lightCodeTheme, darkCodeTheme } from 'prism-react-renderer';
const organizationName = 'mugen-docs';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Mugen Builders',
tagline: 'Developer Advocates at Cartesi',
favicon: 'icons/logo.png',
// Set the production url of your site here
url: `https://${organizationName}.github.io`,
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: `/`,
projectName: 'docs',
organizationName: organizationName,
trailingSlash: false,
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internationalization, 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').ThemeConfig} */
({
docs: {
sidebarPath: './sidebars.ts',
routeBasePath: '/'
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
colorMode: {
defaultMode: 'dark',
disableSwitch: false,
respectPrefersColorScheme: true,
},
navbar: {
title: 'Mugen Builders | Docs',
logo: {
alt: 'logo',
src: 'icons/logo.png',
},
items: [
{
to: "https://github.com/Mugen-Builders",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
},
],
},
footer: {
style: 'dark',
copyright: `Copyright © ${new Date().getFullYear()} Mugen Builders.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
markdown: {
mermaid: true,
},
}),
plugins: [
async function gtmPlugin(context, options) {
return {
name: 'gtm-plugin',
injectHtmlTags() {
return {
headTags: [
{
tagName: 'script',
innerHTML: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-NGX36B79');`,
},
],
};
},
};
},
],
};
export default config;