-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy paththeme.config.tsx
39 lines (36 loc) · 1.06 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
import React from 'react'
import { DocsThemeConfig, useConfig } from 'nextra-theme-docs'
import { useRouter } from 'next/router'
const config: DocsThemeConfig = {
logo: <span>RegenLearnings.xyz</span>,
project: {
link: 'https://github.com/endgameinitiative/regenlearnings.xyz/',
},
docsRepositoryBase: 'https://github.com/endgameinitiative/regenlearnings.xyz/',
footer: {
text: 'RegenLearnings.xyz',
},
useNextSeoProps() {
return {
titleTemplate: '%s – RegenLearnings.xyz'
}
},
head: () => {
const { asPath, defaultLocale, locale } = useRouter()
const { frontMatter } = useConfig()
const url =
'https://regenlearnings.xyz' +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`)
return (
<>
<meta property="og:url" content={url} />
<meta property="og:title" content={frontMatter.title || 'RegenLearnings.xyz'} />
<meta
property="og:description"
content={frontMatter.description || 'RegenLearnings.xyz'}
/>
</>
)
}
}
export default config