-
Notifications
You must be signed in to change notification settings - Fork 74
/
theme.config.tsx
63 lines (58 loc) · 1.6 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
import { useRouter } from 'next/router'
// import localFont from 'next/font/local'
import type { DocsThemeConfig } from 'nextra-theme-docs'
import type { PropsWithChildren } from 'react'
import SafeLogo from './assets/svg/safe-logo-white.svg'
import Feedback from './components/Feedback'
import Footer from './components/Footer'
// const citerne = localFont({ src: './public/fonts/Citerne-Light.woff' })
const Main: React.FC<PropsWithChildren> = ({ children }) => {
const { asPath } = useRouter()
return (
// <div className={citerne.className}>
<div>
{children}
<Feedback asPath={asPath} />
</div>
)
}
const config: DocsThemeConfig = {
darkMode: false,
nextThemes: {
forcedTheme: 'dark'
},
primaryHue: 150,
logo: <SafeLogo />,
project: {
link: 'https://github.com/safe-global'
},
docsRepositoryBase: 'https://github.com/safe-global/safe-docs/tree/main',
footer: {
text: <Footer />
},
sidebar: {
defaultMenuCollapseLevel: 1
},
toc: {
backToTop: true
},
feedback: {
useLink: () =>
'https://github.com/safe-global/safe-docs/issues/new?assignees=&labels=nextra-feedback&projects=&template=nextra-feedback.yml&title=%5BFeedback%5D+'
},
head: <link rel='icon' type='image/png' sizes='32x32' href='/favicon.png' />,
useNextSeoProps: () => {
const { asPath } = useRouter()
const titleTemplate =
(asPath === '/'
? ''
: asPath === '/build-the-new-internet'
? 'Build the New Internet - '
: '%s – ') + 'Safe Docs'
return {
titleTemplate
}
},
main: Main
}
export default config