forked from mx-space/docs-v2-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.tsx
110 lines (107 loc) · 3.11 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import React from 'react'
import { DocsThemeConfig, useConfig } from 'nextra-theme-docs'
import { useRouter } from 'next/router'
const logo = (
<span>
<img
height={40}
src="https://cdn.jsdelivr.net/gh/mx-space/.github@main/uwu.png"
/>
<span>Mix Space</span>
<style jsx>{`
span {
padding: 0.5rem 0.5rem 0.5rem 0;
mask-image: linear-gradient(
60deg,
black 25%,
rgba(0, 0, 0, 0.2) 50%,
black 75%
);
mask-size: 400%;
mask-position: 0%;
display: flex;
align-items: center;
font-size: 16px;
font-weight: 600;
}
img {
margin-right: 8px;
height: 40px;
}
span:hover {
mask-position: 100%;
transition: mask-position 1s ease, -webkit-mask-position 1s ease;
}
`}</style>
</span>
)
const config: DocsThemeConfig = {
logo,
head: function useHead() {
const { title } = useConfig()
return (
<>
<link rel="dns-prefetch" href="//pan.vinua.cn" />
<meta name="msapplication-TileColor" content="#fff" />
<meta name="theme-color" content="#fff" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta httpEquiv="Content-Language" content="en" />
<meta
name="description"
content="A flexible, modular CMS Blog System."
/>
<meta
name="og:description"
content="A flexible, modular CMS Blog System."
/>
<meta name="twitter:card" content="summary_large_image" />
{/* <meta name="twitter:image" content={socialCard} /> */}
<meta name="twitter:site:domain" content="mog.js.org" />
<meta name="twitter:url" content="https://mog.js.org" />
<meta
name="og:title"
content={title ? title + ' | Mix Space' : 'Mix Space'}
/>
{/* <meta name="og:image" content={socialCard} /> */}
<meta name="apple-mobile-web-app-title" content="Mix Space" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="icon" href="/favicon.png" type="image/png" />
</>
)
},
project: {
link: 'https://github.com/mx-space/core',
},
docsRepositoryBase: 'https://github.com/mx-space/docs/blob/main',
footer: {
text: (
<div className="flex w-full flex-col items-center sm:items-start">
<p className="text-xs">
© {new Date().getFullYear()} This project is licensed under AGPLv3
with additional terms, and this documentation is licensed under CC BY
4.0. All licensed. 2021-present Mix Space Team
</p>
</div>
),
},
useNextSeoProps() {
const { asPath } = useRouter()
if (asPath !== '/') {
return {
titleTemplate: '%s | Mix Space',
}
}
},
editLink: {
text: 'Edit this page on GitHub →',
},
banner: {
key: 'theme-shiro',
text: (
<a href="https://mx-space.js.org/themes/shiro" target="_blank">
🎨 New Mix Space theme `Shiro` is released. Read more →
</a>
),
},
}
export default config