-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.tsx
87 lines (85 loc) · 1.83 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
82
83
84
85
86
87
import React from "react";
import { DocsThemeConfig } from "nextra-theme-docs";
import Image from "next/image";
import dayjs from "dayjs";
import { DocSearch } from "@docsearch/react";
import { Steps } from "nextra-theme-docs";
import { components } from "mdx-elements";
import { Vercel } from "./components/Vercel";
const config: DocsThemeConfig = {
logo: <Image width={30} height={30} alt="" src="/img/logo.png" />,
logoLink: "/",
project: {
link: "https://github.com/try-to-fly/wiki",
},
sidebar: {
// 默认都折叠
defaultMenuCollapseLevel: 1,
},
toc: {
float: true,
title: "目录",
},
useNextSeoProps() {
return {
titleTemplate: "%s – 微笑Wiki",
};
},
editLink: {
text: null,
},
feedback: {
content: null,
},
search: {
component: () => (
<DocSearch
appId="9UW5P96GU5"
apiKey="b34e3dc2882fc21748b96a0805a34ab1"
indexName="wiki-hub"
/>
),
},
head: () => {
return (
<>
<link
rel="icon"
sizes="654x654"
type="image/png"
href="/img/logo.png"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</>
);
},
footer: {
text: () => {
return (
<a
href={`https://vercel.com`}
target="_blank"
rel="noopener"
className="inline-flex items-center no-underline text-current font-semibold"
>
<span className="mr-2">Powered by</span>
<span>
<Vercel />
</span>
</a>
);
},
},
components: {
...components,
Steps,
},
gitTimestamp: ({ timestamp }) => {
return (
<span>
最后更新时间:{dayjs(timestamp).format("YYYY-MM-DD HH:mm:ss")}
</span>
);
},
};
export default config;