-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
theme.config.jsx
75 lines (73 loc) · 1.84 KB
/
theme.config.jsx
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
import { useRouter } from 'next/router'
import { useConfig } from 'nextra-theme-docs'
export default {
docsRepositoryBase: 'https://github.com/MrWillCom/ChemWiki/tree/main',
head() {
const { asPath, defaultLocale, locale } = useRouter()
const { frontMatter, title } = useConfig()
const url =
'https://chemwiki.mrwillcom.com' +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`)
return (
<>
<title>{title + ' · ChemWiki'}</title>
<meta property="og:url" content={url} />
<meta property="og:title" content={title + ' · ChemWiki'} />
<meta
property="og:description"
content={frontMatter.description || '中学化学知识库'}
/>
</>
)
},
logo: <span>ChemWiki</span>,
project: {
link: 'https://github.com/MrWillCom/ChemWiki',
},
search: {
emptyResult: (
<div className="nx-mt-4 nx-flex nx-justify-center nx-items-center nx-text-gray-500 nx-font-semibold nx-text-s nx-select-none">
没有结果
</div>
),
loading: '加载中...',
placeholder: '搜索',
},
sidebar: {
defaultMenuCollapseLevel: 1,
toggleButton: true,
},
themeSwitch: {
useOptions() {
return {
light: '浅色',
dark: '深色',
system: '跟随系统',
}
},
},
toc: {
title: null,
backToTop: '返回顶部',
},
editLink: {
content: '编辑本页面 ↗',
},
feedback: {
content: '有问题?前往反馈 ↗',
},
footer: {
content: (
<span>
{new Date().getFullYear() === 2022
? '2022'
: '2022 - ' + new Date().getFullYear()}{' '}
· By all{' '}
<a href="https://github.com/MrWillCom/ChemWiki" target="_blank">
ChemWiki
</a>{' '}
contributors with ❤️.
</span>
),
},
}