This repository was archived by the owner on Jul 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme.config.tsx
More file actions
130 lines (127 loc) · 4.12 KB
/
theme.config.tsx
File metadata and controls
130 lines (127 loc) · 4.12 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import { useTheme } from "nextra-theme-docs";
import { useState, useEffect } from "react";
import Image from "next/image";
import Link from "next/link";
import { useRouter } from "next/router";
import { useConfig } from "nextra-theme-docs";
import urlcat from "urlcat";
import logo from "./public/512.webp";
const useDark = () => {
const { resolvedTheme } = useTheme();
const [isDark, setIsDark] = useState(false);
useEffect(() => {
setIsDark(resolvedTheme === "dark");
}, [resolvedTheme]);
return isDark;
};
const config = {
project: {
link: "https://github.com/Linear-Fox",
},
toc: {
extraContent: () => {
return (
<>
<Link target="_blank" href="https://linearfox.com/">🦊 Linear Fox Website →</Link>
<Link target="_blank" href="https://discord.linearfox.com/">👨💻 Our Discord Server →</Link>
</>
);
},
float: true,
},
feedback: { content: "😊 ❓ Question? Give us feedback", lables: ["😊 Linear Fox Feedback →"] },
navigation: { next: "👉 Next →", prev: "← Previous" },
repository: 'https://github.com/linear-fox',
docsRepository: 'https://github.com/linear-fox/docs',
darkMode: true,
darkModeToggle: true,
darkModeToggleStyle: {
position: "fixed",
top: "1rem",
right: "1rem",
zIndex: 999,
},
editLink: {
component: null,
},
darkModeToggleDark: {
content: "🌙",
title: "Switch to light mode",
},
darkModeToggleLight: {
content: "🌞",
title: "Switch to dark mode",
},
footer: {
poweredBy: {
content: "Powered by",
link: "https://linearfox.com/",
image: logo,
},
links: [
{
title: "🦊 Linear Fox",
links: [
{
title: "🦊 Linear Fox Website",
link: "https://linearfox.com/",
},
{
title: "👨💻 Our Discord Server",
link: "https://discord.gg/fyJWS4yrM8",
},
],
},
],
},
editThisPage: false,
logo: () => {
const isDark = useDark();
return (
<>
<Image
src={isDark ? "/512.webp" : "/512.webp"}
alt="Linear Fox Logo"
width={45}
height={45}
/>
<span className="ml-4 text-xl font-bold">Linear Fox Docs</span>
</>
);
},
useNextSeoProps() {
const { route } = useRouter();
if (route !== "/") {
return {
titleTemplate: "%s – Linear Fox Docs",
};
}
return { titleTemplate: "Linear Fox Docs" };
},
head: () => {
const { asPath } = useRouter();
const { route } = useRouter();
const { title } = useConfig();
return (
<>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Linear Fox Documentation" />
<meta name="og:title" content={title} />
<meta name="og:type" content="website" />
<meta name="og:url" content={urlcat("https://docs.linearfox.com", asPath)} />
<meta name="og:site_name" content="Linear Fox" />
<link rel="icon" href="/512.png" />
<link rel="apple-touch-icon" href="/lfx.png" />
<link rel="manifest" href="/manifest.json" />
<link rel="mask-icon" href="/lfx.png" color="#000000" />
{route === "/" ? (
<meta property="twitter:title" content="Linear Fox Docs" />
) : (
<meta property="twitter:title" content={`${title} - Linear Fox Docs`} />
)}
</>
);
},
}
export default config;