-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy paththeme.config.jsx
More file actions
109 lines (108 loc) · 2.67 KB
/
Copy paththeme.config.jsx
File metadata and controls
109 lines (108 loc) · 2.67 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import { useEffect } from 'react';
import { useTheme } from 'next-themes';
import { CustomFooter } from './components/customFooter';
import { CustomNavbar } from './components/customNavbar';
import { useConfig } from 'nextra-theme-docs';
export default {
head: () => {
const { frontMatter } = useConfig();
return (
<>
{/* Dynamic page title based on frontMatter.title */}
<title>
{frontMatter.title
? `${frontMatter.title}`
: 'Autonomys Developer Hub'}
</title>
{/* Google Analytics script */}
<script async src="https://www.googletagmanager.com/gtag/js?id=G-N417BD8BLW"></script>
<script
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-N417BD8BLW');
`
}}
/>
{/* Favicon */}
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicon.png"
/>
</>
);
},
project: {
link: 'https://autonomys.xyz',
icon: (
<img
src="/logo-black.png"
alt="Autonomys Network Logo"
style={{
height: '24px',
marginRight: '0.5rem',
'@media (min-width: 768px)': {
height: '32px',
}
}}
/>
)
},
sidebar: {
defaultMenuCollapsed: false,
hiddenPages: ['/'], // Hide the sidebar only on the landing page
},
docsRepositoryBase: 'https://github.com/autonomys/developer_docs/blob/main',
logo: (
<>
<img
src="/logo-black.png"
alt="Autonomys Network Logo"
style={{
height: '24px',
marginRight: '0.5rem',
'@media (min-width: 768px)': {
height: '32px',
}
}}
/>
<span
className="hidden md:inline-block"
style={{
fontSize: '1.25rem',
fontWeight: '600',
color: '#374151',
cursor: 'pointer',
transition: 'color 0.3s ease',
}}
onMouseEnter={(e) => (e.currentTarget.style.color = '#6366F1')}
onMouseLeave={(e) => (e.currentTarget.style.color = '#374151')}
>
Developer Documentation
</span>
</>
),
darkMode: true,
nextThemes: {
defaultTheme: 'dark',
storageKey: 'theme',
forcedTheme: undefined,
},
primaryHue: {
light: 220,
dark: 220,
},
themeSwitch: {
useToggleTheme: true,
},
navbar: {
extraContent: <CustomNavbar />,
},
footer: {
component: CustomFooter
},
};