-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.config.tsx
51 lines (44 loc) · 1.35 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 { useConfig } from 'nextra-theme-docs'
import { DocsThemeConfig } from 'nextra-theme-docs'
import Image from 'next/image'
const config: DocsThemeConfig = {
logo: <div className="nx-flex nx-gap-2 nx-items-center">
<Image alt="logo" src="/logo.png" width="28" height="28" />
<h1 className="nx-font-bold nx-text-2xl">Docs</h1>
</div>,
project: {
link: 'https://github.com/dwnstr/docs',
},
chat: {
link: 'https://discord.gg/dawnstar-fivem-603591936372244501',
},
docsRepositoryBase: 'https://github.com/dwnstr/docs/tree/main',
footer: {
text: 'Organized with ❤️ by Dawnstar',
},
useNextSeoProps() {
return {
titleTemplate: '%s - Dawnstar Docs'
}
},
head: () => {
const { asPath, defaultLocale, locale } = useRouter()
const { frontMatter } = useConfig()
const url =
'https://docs.dwnstr.com' +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`)
return (
<>
<meta property="og:url" content={url} />
<meta property="og:title" content={frontMatter.title || 'Dawnstar Docs'} />
<meta
property="og:description"
content={frontMatter.description || 'Open-source docs for FiveM and GTA vehicle developers.'}
/>
</>
)
}
}
export default config