-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy paththeme.config.tsx
81 lines (78 loc) · 1.77 KB
/
theme.config.tsx
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
import { useRouter } from 'next/router';
import type { DocsThemeConfig } from 'nextra-theme-docs';
const Logo = ({ size, ...props }) => (
<svg width={size} height={size} xmlns="http://www.w3.org/2000/svg" {...props}>
<g
id="Custom-Preset"
stroke="none"
strokeWidth={1}
fill="none"
fillRule="evenodd"
transform={`scale(${size / 320})`}
>
<path
id="re"
stroke="currentColor"
strokeWidth={20}
strokeLinecap="round"
strokeLinejoin="round"
d="M222.202 206.84 125.93 43 28 206.84h147.01l-48.911-86.358-25.5 46.737"
/>
</g>
</svg>
);
// theme.config.js
const config: DocsThemeConfig = {
project: {
link: 'https://github.com/kusstar/rewind-docs', // GitHub link in the navbar
},
docsRepositoryBase: 'https://github.com/kusstar/rewind-docs/blob/master', // base URL for the docs repository
useNextSeoProps() {
const { asPath } = useRouter()
if (asPath !== '/') {
return {
titleTemplate: '%s – 倒带'
}
}
},
toc: {
float: true,
},
navigation: {
prev: true,
next: true,
},
feedback: {
content: null
},
darkMode: true,
nextThemes: {
defaultTheme: 'system',
},
editLink: {
text: "在 GitHub 上编辑此页",
},
search: {
placeholder: '搜索……',
},
footer: {
text: null
},
logo: (
<>
<Logo size={32} style={{
marginTop: 6
}} />
<span>倒带</span>
</>
),
head: (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Rewind" />
<meta name="og:title" content="Rewind" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg"></link>
</>
),
}
export default config