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
|
/*
* Copyright (c) Facebook, Inc. and its affiliates.
* Copyright (c) 2023 Kristóf Marussy <kristof@marussy.com>
*
* SPDX-License-Identifier: MIT
*/
import type { PluginOptions as ClassicThemeOptions } from '@docusaurus/theme-classic';
import type { UserThemeConfig } from '@docusaurus/theme-common';
import type { Config } from '@docusaurus/types';
import { Config as SwcConfig } from '@swc/core';
import smartypants from 'remark-smartypants';
export default {
title: 'Kristóf Marussy',
url: 'https://marussy.com',
baseUrl: '/',
staticDirectories: ['third-party/static', 'static'],
plugins: [
[
'@docusaurus/plugin-content-pages',
{
remarkPlugins: [[smartypants, { dashes: 'oldschool' }]],
},
],
'@docusaurus/plugin-sitemap',
'./src/plugins/compressionPlugin.ts',
'./src/plugins/responsiveLoaderPlugin.ts',
'./src/plugins/swcMinifyPlugin.ts',
'./src/plugins/thirdPartyContentPlugin.ts',
],
themes: [
[
'@docusaurus/theme-classic',
{
customCss: [require.resolve('./src/css/custom.css')],
} satisfies ClassicThemeOptions,
],
],
onBrokenLinks: 'warn',
themeConfig: {
colorMode: {
respectPrefersColorScheme: true,
},
navbar: {
title: 'Kristóf Marussy',
hideOnScroll: true,
items: [
{
type: 'dropdown',
label: 'About',
to: '/',
items: [
{
label: 'Research',
to: '/#research',
},
{
label: 'Publications',
to: '/#publications',
},
{
label: 'Resume',
to: '/#resume',
},
{
label: 'Contact',
to: '/#contact',
},
],
},
{
label: 'CV',
to: 'pathname:///cv.pdf',
},
],
},
footer: {
links: [
{
title: 'Pages',
items: [
{
label: 'About',
to: '/',
},
],
},
],
copyright: 'Built with ❤︎ and Docusaurus.',
},
} satisfies UserThemeConfig,
webpack: {
// Speed up builds by using a native Javascript loader.
// See: https://github.com/facebook/docusaurus/issues/4765#issuecomment-841135926
// But we follow the Docusaurus upstear from
// https://github.com/facebook/docusaurus/blob/791da2e4a1a53aa6309887059e3f112fcb35bec4/website/docusaurus.config.ts#L152-L171 // and use swc instead of esbuild.
jsLoader: (isServer) => ({
loader: require.resolve('swc-loader'),
options: {
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
},
transform: {
react: {
runtime: 'automatic',
},
},
target: 'es2017',
},
module: {
type: isServer ? 'commonjs' : 'es6',
},
} satisfies SwcConfig,
}),
},
} satisfies Config;
|