-
Notifications
You must be signed in to change notification settings - Fork 9
/
theme.config.tsx
65 lines (63 loc) · 1.58 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
import type { DocsThemeConfig} from 'nextra-theme-docs';
import { useConfig } from '@/nextra-theme-docs/src/contexts'
import { useRouter } from 'next/router'
const config: DocsThemeConfig = {
docsRepositoryBase: 'https://github.com/blocklessnetwork/blockless-support-review/blob/main',
useNextSeoProps() {
const { asPath } = useRouter()
return {
titleTemplate: asPath === '/' ? 'Docs – Blockless' : '%s – Blockless'
}
},
head: () => {
const { frontMatter } = useConfig()
return <>
<meta property="og:title" content={frontMatter.title || 'Blockless Docs'} />
<meta property="og:description" content={frontMatter.description || 'Blockless Docs'} />
</>
},
nextThemes: {
defaultTheme: 'light',
},
sidebar: {
defaultMenuCollapseLevel: 1,
toggleButton: false,
},
navbar: {
component: null
},
footer: {
component: null
},
themeSwitch: {
component: null
},
feedback: {
content: 'Question? Give us feedback',
labels: 'feedback'
},
editLink: {
text: 'Edit this page on GitHub'
},
darkMode: false,
search:{
placeholder: 'Documentation',
},
gitTimestamp: ({ timestamp }) => {
const { locale = 'en-US', pathname } = useRouter()
if(!pathname.startsWith('/docs/')) return null;
return (
<>
Last updated on{' '}
<time dateTime={timestamp.toISOString()}>
{timestamp.toLocaleDateString(locale, {
day: 'numeric',
month: 'long',
year: 'numeric'
})}
</time>
</>
)
},
}
export default config;