Repository navigation
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
101 lines (98 loc) · 2.76 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
101 lines (98 loc) · 2.76 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
const {execSync} = require('node:child_process');
const redirects = require('./redirects.js');
const hasFullHistory = (() => {
try {
return execSync('git rev-parse --is-shallow-repository', {stdio: ['ignore', 'pipe', 'ignore']})
.toString()
.trim() === 'false';
} catch (e) {
return false;
}
})();
const embeddedFlag = () => ({
name: 'mw-embedded-flag',
injectHtmlTags: () => ({
headTags: [
{
tagName: 'script',
innerHTML: 'try{if(window.parent!==window)document.documentElement.setAttribute("data-embedded","")}catch(e){}'
}
]
})
});
module.exports = {
title: 'MistWarp Docs',
tagline: 'Guides and reference for the MistWarp editor, extensions, packager and backend.',
url: 'https://mistwarp.org',
baseUrl: '/docs/',
trailingSlash: true,
onBrokenLinks: 'throw',
onBrokenAnchors: 'throw',
markdown: {
hooks: {
onBrokenMarkdownLinks: 'throw'
}
},
favicon: 'favicon.ico',
organizationName: 'MistWarp',
projectName: 'docs',
clientModules: [
require.resolve('./src/clientModules/spotlight-key.js')
],
themeConfig: {
navbar: {
title: 'MistWarp Docs',
hideOnScroll: false,
items: [
{type: 'docSidebar', sidebarId: 'using', label: 'Using MistWarp', position: 'left'},
{type: 'docSidebar', sidebarId: 'extensions', label: 'Extensions', position: 'left'},
{type: 'docSidebar', sidebarId: 'packager', label: 'Packager', position: 'left'},
{type: 'docSidebar', sidebarId: 'contributing', label: 'Contributing', position: 'left'},
{type: 'docSidebar', sidebarId: 'backend', label: 'Backend', position: 'left'},
{type: 'search', position: 'right'},
{href: 'https://github.com/MistWarp/docs', label: 'GitHub', position: 'right', className: 'mw-navbar-github'}
]
},
docs: {
sidebar: {
autoCollapseCategories: true
}
},
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 3
},
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true
},
prism: {
theme: require('./code-themes/light'),
darkTheme: require('./code-themes/dark')
}
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
routeBasePath: '/',
editUrl: 'https://github.com/MistWarp/docs/edit/master/',
breadcrumbs: true,
showLastUpdateTime: hasFullHistory
},
blog: false,
theme: {
customCss: require.resolve('./src/css/custom.css')
}
}
]
],
plugins: [
embeddedFlag,
'./plugins/search-index.js',
['@docusaurus/plugin-client-redirects', {redirects}]
]
};