-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy paththeme.config.jsx
More file actions
148 lines (137 loc) · 3.83 KB
/
theme.config.jsx
File metadata and controls
148 lines (137 loc) · 3.83 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
import Image from 'next/image'
import { Analytics } from '@vercel/analytics/react';
const github = 'https://github.com/DspreadOrg/docs';
import { useConfig, useTheme } from 'nextra-theme-docs';
import { useRouter } from 'next/router';
import DspreadLogo from './public/dspread-logo.png';
const Logo = ({ height, width }) => {
const { theme } = useTheme();
const config = useConfig();
return (
<div style={{ alignItems: 'center', display: 'flex', gap: '8px' }}>
<Image src={DspreadLogo} alt="Dspread logo" width={width} height={height} />
<span style={{ fontWeight: 'bold', fontSize: 18 }}>Dspread Doc</span>
</div>
);
};
const config = {
docsRepositoryBase: `${github}/blob/main`,
chat: {
link: 'https://discord.com/invite/n5BX8dh8rU',
},
banner: {
key: 'docs-launch',
text: (
<div className="flex justify-center items-center gap-2">
Welcome to the Dspread Documentation! 👋
</div>
),
},
toc: {
float: true,
},
project: {
link: github,
},
darkMode: true,
nextThemes: {
defaultTheme: 'light',
},
primaryHue: {
dark: 207,
light: 212,
},
footer: {
text: (
<div>
<span>{new Date().getFullYear()} © </span>
<a href="#" target="_blank">
Dspread
</a>
</div>
),
},
editLink: {
text: 'Edit this page on GitHub',
},
logo() {
return (
<div className="flex items-center gap-2">
<Logo width={28} height={28} />
</div>
);
},
useNextSeoProps() {
return {
titleTemplate: `%s - Dspread Documentation`,
};
},
head() {
const { frontMatter } = useConfig();
const { theme } = useTheme();
const config = useConfig();
const basePath = config.basePath || '';
const title = frontMatter?.title || 'Dspread Documentation';
const description =
frontMatter?.description ||
'Dspread Documentation - Payment integration guide'
const image = `https://raw.githubusercontent.com/DspreadOrg/docs/main/public/dspread-logo.png`;
const composedTitle = `${title} – Dspread Documentation`;
return (
<>
<link
rel="apple-touch-icon"
sizes="180x180"
href="/docs/favicons/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/docs/favicons/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/docs/favicons/favicon-16x16.png"
/>
<meta name="theme-color" content="#ffffff" />
<meta name="msapplication-TileColor" content="#00a300" />
<link rel="manifest" href="/docs/favicons/site.webmanifest" />
<meta httpEquiv="Content-Language" content="en" />
<meta name="title" content={composedTitle} />
<meta name="description" content={description} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@Dspread" />
<meta name="twitter:image" content={image} />
<meta property="og:description" content={description} />
<meta property="og:title" content={composedTitle} />
<meta property="og:image" content={image} />
<meta property="og:type" content="website" />
<meta
name="apple-mobile-web-app-title"
content="Dspread Documentation"
/>
</>
);
},
sidebar: {
defaultMenuCollapseLevel: 1,
toggleButton:true,
autoCollapse: true,
titleComponent: ({ title, type }) =>
type === 'separator' ? (
<div className="separator-title">
{title}
</div>
) : (
<>{title}
</>
),
},
gitTimestamp: ({ timestamp }) => (
<>Last updated on {timestamp.toLocaleDateString()}</>
),
};
export default config;