-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.jsx
52 lines (50 loc) · 1.5 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
import { useRouter } from "next/router"
import { useConfig } from 'nextra-theme-docs'
export default {
docsRepositoryBase: 'https://github.com/aeilot/GeoWiki/tree/main',
head: () => {
const { asPath } = useRouter()
const { frontMatter, title } = useConfig()
return <>
<meta property="og:url" content={`https://geowiki.aeilot.top${asPath}`} />
<meta property="og:title" content={title + ' · GeoWiki'} />
<meta property="og:description" content={frontMatter.description || '中学地理知识库'} />
</>
},
logo: <span>GeoWiki</span>,
project: {
link: 'https://github.com/aeilot/GeoWiki',
},
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: 0,
},
toc: {
title: null,
},
editLink: {
text: '编辑本页面 ↗',
},
feedback: {
content: '有问题?前往反馈 ↗',
},
footer: {
text: <span>{new Date().getFullYear() === 2022 ? '2022' : '2022 - ' + new Date().getFullYear()} · By all <a href="https://github.com/aeilot/GeoWiki" target="_blank">GeoWiki</a> contributors with ❤️.</span>,
},
useNextSeoProps() {
const { route } = useRouter()
if (route !== '/') {
return {
titleTemplate: '%s · GeoWiki'
}
} else {
return {
titleTemplate: 'GeoWiki'
}
}
},
}