-
Notifications
You must be signed in to change notification settings - Fork 4
/
theme.config.tsx
78 lines (71 loc) · 2.25 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
import { useConfig, type DocsThemeConfig } from "nextra-theme-docs";
const footer = {
content: (
<div>
<a
target="_blank"
rel="noopener noreferrer"
title="Creative Commons homepage"
href="https://creativecommons.org/licenses/by-nc/4.0/"
>
CC BY-NC 4.0
</a>
<span>© {new Date().getFullYear()} 旋元佑</span>
</div>
),
};
const config: DocsThemeConfig = {
docsRepositoryBase: "https://github.com/liby/advanced-grammar/edit/main",
editLink: {
content: "在 GitHub 上编辑此页 →",
},
feedback: {
content: "发现问题?欢迎反馈 →",
labels: "feedback",
},
footer,
logo: <span>旋元佑进阶文法</span>,
head: function useHead() {
const config = useConfig();
const title = `${config.title} – 旋元佑进阶文法`;
const description =
config.frontMatter.description || '「征服英文句子写作」';
return (
<>
<title>{title}</title>
<meta name="og:title" content={title || "旋元佑进阶文法"} />
<meta name="apple-mobile-web-app-title" content="旋元佑进阶文法" />
<meta name="description" content={description} />
<meta name="og:description" content={description} />
<meta name="msapplication-TileColor" content="#fff" />
<meta httpEquiv="Content-Language" content="en" />
<meta name="theme-color" content="#fff" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site:domain" content="grammar.itswhat.me" />
<meta name="twitter:url" content="https://grammar.itswhat.me" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="icon" href="/favicon.png" type="image/png" />
<link
rel="icon"
href="/favicon-dark.svg"
type="image/svg+xml"
media="(prefers-color-scheme: dark)"
/>
<link
rel="icon"
href="/favicon-dark.png"
type="image/png"
media="(prefers-color-scheme: dark)"
/>
</>
);
},
project: {
link: "https://github.com/liby/advanced-grammar",
},
toc: {
title: "页面导航",
backToTop: true,
},
};
export default config