This repository has been archived by the owner on Sep 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
139 lines (132 loc) · 3.5 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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require("prism-react-renderer/themes/vsLight");
const darkCodeTheme = require("prism-react-renderer/themes/vsDark");
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Docs",
tagline: "Documentation for all projects",
favicon: "/assets/favicons/favicon.ico?v=5",
// GitHub pages deployment config.
url: "https://docs.tonantzintla.org",
baseUrl: "/",
organizationName: "Tonantzintla",
projectName: "Documentation",
trailingSlash: false,
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
i18n: {
defaultLocale: "en",
locales: ["en"],
},
presets: [
[
"@docusaurus/preset-classic",
{
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
docs: {
id: "default",
path: "docs/guide",
routeBasePath: "/guide",
sidebarPath: require.resolve("./sidebars.js"),
},
},
],
],
plugins: [
[
"@docusaurus/plugin-ideal-image",
{
quality: 70,
sizes: [320, 640, 960, 1280, 1600, 1920],
},
],
[
"@docusaurus/plugin-content-docs",
{
id: "arrayfield",
path: "docs/arrayfield",
routeBasePath: "/arrayfield",
sidebarPath: require.resolve("./sidebars.js"),
},
],
async function myPlugin(context, options) {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
// Appends TailwindCSS and AutoPrefixer.
postcssOptions.plugins.push(require("tailwindcss"));
postcssOptions.plugins.push(require("autoprefixer"));
return postcssOptions;
},
};
},
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
colorMode: {
defaultMode: "dark",
disableSwitch: false,
respectPrefersColorScheme: false,
},
metadata: [
{ name: "theme-color", content: "#2B2D31" },
{ property: "og:type", content: "article" },
{ property: "og:url", content: "https://docs.tonantzintla.org" },
{ property: "og:locale", content: "en" },
{ property: "og:site_name", content: "TON" },
{ name: "twitter:card", content: "summary_large_image" },
],
image: "img/banner.png",
navbar: {
title: "Documentation",
logo: {
alt: "TON Logo",
src: "img/logo.svg",
},
style: "dark",
items: [
{
type: "search",
position: "right",
},
{
to: "/guide",
position: "left",
label: "Get Started",
},
{
type: "dropdown",
label: "Projects",
items: [
// Add your project under the last item
{
to: "/arrayfield",
label: "Arrayfield",
},
],
position: "left",
},
],
},
prism: {
additionalLanguages: ["lua"],
defaultLanguage: "lua",
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
algolia: {
indexName: "tonantzintla",
appId: "AZKUWVWV9U",
apiKey: "361d02d439684347da425d2e8a5a8da7",
contextualSearch: false,
},
footer: {
copyright: `Powered by TON`,
},
}),
};
module.exports = config;