-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.config.tsx
52 lines (48 loc) · 1.33 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
import React from 'react'
import { useRouter } from 'next/router'
import type { DocsThemeConfig } from 'nextra-theme-docs'
import { useConfig } from 'nextra-theme-docs'
const config: DocsThemeConfig = {
logo: <span>JellyDocs</span>,
docsRepositoryBase: 'https://github.com/Jellyfish4654/JellyDocs/tree/main/JellyDocs',
footer: {
text: ' ',
},
useNextSeoProps() {
return {
titleTemplate: '%s – JellyDocs'
}
},
head: () => {
const { asPath, defaultLocale, locale } = useRouter()
const { frontMatter } = useConfig()
const url =
'https://jellyfishbbhs.com/JellyDocs' +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`)
return (
<>
<meta property="og:url" content={url} />
<meta property="og:title" content={frontMatter.title || 'JellyDocs'} />
<meta
property="og:description"
content={frontMatter.description || 'JellyDocs: The Ultimate Guide to Navigating the Sea of Knowledge'}
/>
</>
)
},
sidebar: {
titleComponent({ title, type }) {
if (type === 'separator') {
return <span className="cursor-default">{title}</span>
}
return <>{title}</>
},
defaultMenuCollapseLevel: 1,
toggleButton: true
},
toc: {
float: true,
backToTop: true,
},
}
export default config