-
Notifications
You must be signed in to change notification settings - Fork 1
/
theme.config.jsx
148 lines (142 loc) · 3.94 KB
/
theme.config.jsx
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
import { useRouter } from "next/router";
import { useConfig } from "nextra-theme-docs";
import Logo from "./components/allegro";
// import { Discord, Github } from "./components/social";
import GroupHug from "./components/GroupHug";
/** @type {import('nextra-theme-docs').DocsThemeConfig} */
const themeConfig = {
sidebar: {
defaultMenuCollapseLevel: 3,
},
project: {
link: "https://github.com/yomorun/presencejs",
},
docsRepositoryBase:
"https://github.com/yomorun/presence.js.org/tree/gh-pages",
useNextSeoProps() {
return {
titleTemplate: "%s – Presencejs",
};
},
toc: {
float: true,
title: "On this page",
},
search: {
placeholder: "Search documentation ...",
},
editLink: {
text: "edit this page",
},
feedback: {
content: "feedback",
},
chat: {
link: "https://discord.gg/Ugam5qAvHy",
},
navbar: {
extraContent: (
<>
<GroupHug />
</>
),
},
nextThemes: {
defaultTheme: "dark",
},
faviconGlyph: "🌎",
logo: () => {
return (
<>
<Logo height={24} />
<span
className="hidden mx-2 font-extrabold select-none md:inline"
title="Allegro Cloud"
>
Presencejs
</span>
</>
);
},
head: () => {
const { route } = useRouter();
const { frontMatter, title } = useConfig();
const titleSuffix = "Tutorials";
const description =
"Edge Infra for realtime web applications with Geo-distributed architecture";
const imageUrl = new URL("https://presence-doc.yomo.run/api/og"); // TODO
if (!/\/index\.+/.test(route)) {
imageUrl.searchParams.set("title", title || titleSuffix);
}
const ogTitle = title
? `${title} – Presencejs`
: `Presencejs: ${titleSuffix}`;
const ogDescription = frontMatter.description || description;
const ogImage = frontMatter.image || imageUrl.toString();
return (
<>
{/* Favicons, meta */}
<link
rel="apple-touch-icon"
sizes="180x180"
href="/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicon/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/favicon/favicon-16x16.png"
/>
<link rel="icon" type="image/svg+xml" href="/favicon/favicon.svg" />
<link
rel="mask-icon"
href="/favicon/safari-pinned-tab.svg"
color="#000000"
/>
<meta httpEquiv="Content-Language" content="en-US" />
<meta name="msapplication-TileColor" content="#ffffff" />
<meta name="apple-mobile-web-app-title" content="SWR" />
<meta name="description" content={ogDescription} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@vercel" />
<meta name="twitter:image" content={ogImage} />
<meta property="og:title" content={ogTitle} />
<meta property="og:description" content={ogDescription} />
<meta property="og:image" content={ogImage} />
<meta name="msvalidate.01" content="140AFD0B895CB35AF8974E14726A11BC" />
<meta
name="google-site-verification"
content="vyCEWFzpKJ1zic0RiOREYpWWFtMKfqfFxcOYK64njrg"
/>
<script
async
src="https://analytics.umami.is/script.js"
data-website-id="af578941-ecba-48dc-8935-8935ba8ca0ff"
></script>
</>
);
},
footer: {
text: () => {
return (
<a
href={`https://allegrocloud.io/?utm_source=presencejs-doc`}
target="_blank"
rel="noopener"
className="inline-flex items-center font-semibold text-current no-underline"
>
<span>
<Logo height={20} />
</span>
</a>
);
},
},
};
export default themeConfig;