-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.jsx
111 lines (109 loc) · 2.54 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
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
111
import pkg from './package.json'
export default {
logo: () => {
return (
<span className="inline-flex items-center gap-2">
<img src="https://univer.ai/images/univer.svg" alt="Univer" className="size-8" />
<span className="text-xl">
Univer
</span>
</span>
)
},
project: {
link: 'https://github.com/dream-num/univer',
},
chat: {
link: 'https://discord.gg/XPGnMBmpd6',
},
i18n: [
{ locale: 'en-US', text: 'English' },
],
docsRepositoryBase: 'https://github.com/dream-num/univer.ai/tree/main',
head: null,
useNextSeoProps() {
return {
titleTemplate: '%s – Univer',
description: 'Univer is an open-source alternative to Google Sheets, Slides, and Docs',
openGraph: {
type: 'website',
locale: 'en_US',
url: 'https://univer.ai',
site_name: 'Univer',
images: [
{
url: 'https://univer.ai/images/og.png',
alt: 'Univer',
},
],
},
twitter: {
handle: '@univerhq',
site: '@univerhq',
cardType: 'summary_large_image',
},
}
},
banner: {
dismissible: true,
key: pkg.version,
text: () => {
return (
<a href={`https://github.com/dream-num/univer/releases/tag/v${pkg.version}`} target="_blank">
🎉 v
{pkg.version}
{' '}
is released. Read more →
</a>
)
},
},
primaryHue: 200,
sidebar: {
toggleButton: true,
titleComponent({ title }) {
const apiTitles = [
'classes',
'type-aliases',
'interfaces',
'variables',
'functions',
'namespaces',
'enumerations',
]
if (apiTitles.includes(title)) {
const initial = title.charAt(0).toUpperCase()
return (
<span className="flex gap-2 items-center">
<span className="font-semibold border-2 border-stone-700 rounded-md size-6 flex items-center justify-center">
{initial}
</span>
<span>
{initial}
{title.slice(1)}
</span>
</span>
)
}
else if (title.startsWith('@univerjs')) {
return <span className="font-semibold">{title}</span>
}
else {
return title
}
},
},
feedback: {
content: null,
},
editLink: {
component: null,
},
footer: {
text: (
<span>
Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.
</span>
),
},
}