-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.ts
89 lines (80 loc) · 2.01 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
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
const config: Config = {
title: 'Syntax Reference',
tagline: 'A syntax reference guide for multiple programming languages and others',
favicon: 'img/logo.png',
url: 'https://syntaxreference.dev/',
baseUrl: '/',
organizationName: 'SyntaxReference',
projectName: 'SyntaxReference.dev',
onBrokenLinks: 'throw',
onBrokenAnchors: 'throw',
onBrokenMarkdownLinks: 'throw',
i18n: {
defaultLocale: 'en-US',
locales: ['en-US'],
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
routeBasePath: '/', // Removes '/doc/' from url
editUrl: 'https://github.com/SyntaxReference/SyntaxReference.dev/tree/main',
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
image: 'img/SocialCard.png',
colorMode: {
defaultMode: 'dark',
disableSwitch: false,
respectPrefersColorScheme: true,
},
navbar: {
title: 'Syntax Reference',
logo: {
alt: 'Syntax Reference Logo',
src: 'img/logo.png',
},
items: [
{
href: '/',
position: 'left',
label: 'Home',
},
{
type: 'docSidebar',
sidebarId: 'programmingLanguagesSidebar',
position: 'left',
label: 'Programming Languages',
},
{
href: 'https://github.com/SyntaxReference/SyntaxReference.dev',
label: 'Contribute on GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [],
copyright: `Copyright © ${new Date().getFullYear()} Syntax Reference. Built with Docusaurus.`,
},
prism: {
additionalLanguages: ['c', 'cpp', 'csharp', 'java', 'rust', 'go', 'javascript', 'typescript', 'python'],
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
plugins: [require.resolve('docusaurus-lunr-search')],
};
export default config;