-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
70 lines (68 loc) · 2.33 KB
/
Copy pathdocusaurus.config.ts
File metadata and controls
70 lines (68 loc) · 2.33 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
import type { Config } from '@docusaurus/types';
import { siteConfig } from './src/config/global';
import { linksConfig } from './src/config/links';
import type * as Preset from '@docusaurus/preset-classic';
import { themes as prismThemes } from 'prism-react-renderer';
import tailwindCssPlugin from './plugins/tailwindcss-config';
import renderMessages from './plugins/render-messages';
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
const config: Config = {
url: siteConfig.url,
title: siteConfig.title,
baseUrl: siteConfig.base,
favicon: siteConfig.favicon,
tagline: siteConfig.description,
i18n: {
defaultLocale: 'en',
locales: ['en']
},
markdown: {
mermaid: true
},
themeConfig: {
image: siteConfig.social,
navbar: {
title: siteConfig.title,
items: linksConfig.navigators,
logo: { src: siteConfig.logo }
},
imageZoom: { selector: '.markdown img' },
footer: { style: 'light', copyright: siteConfig.copyright },
prism: { theme: prismThemes.github, darkTheme: prismThemes.dracula },
colorMode: {
defaultMode: 'light',
disableSwitch: true,
respectPrefersColorScheme: false
}
} satisfies Preset.ThemeConfig,
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: './sidebars.ts',
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex],
editUrl: 'https://github.com/anyshake/homepage/blob/master/'
},
blog: {
showReadingTime: true,
feedOptions: {
type: ['rss', 'atom'],
xslt: true
},
onInlineTags: 'warn',
onInlineAuthors: 'warn',
onUntruncatedBlogPosts: 'warn'
},
theme: { customCss: './src/css/custom.css' }
} satisfies Preset.Options
]
],
themes: ['@docusaurus/theme-mermaid'],
plugins: [tailwindCssPlugin, renderMessages, 'plugin-image-zoom'],
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn'
};
export default config;