generated from shuding/nextra-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy paththeme.config.tsx
74 lines (71 loc) · 2.05 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
import { DocsThemeConfig } from 'nextra-theme-docs'
import { useConfig } from 'nextra-theme-docs'
import { useRouter } from 'next/router'
import Image from 'next/image'
import logo from './assets/logo_horizontal.png'
import React from 'react'
const config: DocsThemeConfig = {
logo: (
<>
<Image src={logo} alt="Enso Logo" width="148" height="64" />
</>
),
navigation: {
prev: true,
next: true,
},
gitTimestamp: true,
project: {
link: 'https://enso.finance',
},
chat: {
link: 'https://t.me/enso_intent_engine',
},
docsRepositoryBase: 'https://github.com/EnsoFinance/shortcuts-docs',
footer: {
text: 'Enso Shortcuts Registry Docs',
},
useNextSeoProps() {
const { route } = useRouter()
if (route !== '/') {
return {
titleTemplate: '%s – Enso Docs',
}
}
},
head: () => {
const { asPath } = useRouter()
const { frontMatter } = useConfig()
const socialCard = `https://i.imgur.com/xsGIovj.png`
return (
<>
<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="The Enso Shortcuts API documentation"
/>
<meta
name="og:description"
content="The Enso Shortcuts API documentation"
/>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content={socialCard} />
<meta name="twitter:site:domain" content="docs.enso.finance" />
<meta name="twitter:url" content="https://docs.enso.finance" />
<meta name="og:image" content={socialCard} />
<meta
property="og:url"
content={`https://docs.enso.finance.com${asPath}`}
/>
<meta
property="og:title"
content={frontMatter.title || 'Enso Shortcuts API'}
/>
</>
)
},
}
export default config