-
Notifications
You must be signed in to change notification settings - Fork 6
/
theme.config.tsx
50 lines (47 loc) · 1.22 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
import React from 'react'
import { useRouter } from 'next/router'
import { DocsThemeConfig, useConfig } from 'nextra-theme-docs'
const config: DocsThemeConfig = {
logo: <span className="font-semibold text-xl">hello.dev</span>,
darkMode: false,
docsRepositoryBase: 'https://github.com/hellocoop/hello.dev/tree/main/',
sidebar: {
defaultMenuCollapseLevel: 1 //sidebar items collapsed by default
},
footer: {
text: '',
},
feedback: {
content: () => <span style={{marginRight: '-5px'}}>Question? Give us feedback</span>
},
toc: {
backToTop: true,
},
editLink: {
text: "Edit this page on GitHub"
},
head: null,
useNextSeoProps() {
const { asPath } = useRouter()
const description = useConfig().frontMatter.description || 'hello.dev'
if (asPath !== '/') {
return {
description,
titleTemplate: '%s | hello.dev',
openGraph: {
type: 'website',
locale: 'en_US',
url: 'https://hello.dev',
site_name: 'hello.dev',
description,
},
twitter: {
handle: '@hellocoop',
site: '@hellocoop',
cardType: 'summary_large_image',
}
}
}
}
}
export default config