-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.tsx
183 lines (171 loc) · 6.6 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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
import React from "react";
import { DocsThemeConfig, useConfig } from "nextra-theme-docs";
import Logo from "./src/components/logo";
import Npm from "./src/components/npm";
import { useRouter } from "next/router";
const config: DocsThemeConfig = {
useNextSeoProps() {
return {
titleTemplate: "VERSE.DB | %s",
};
},
logo: () => {
return (
<>
<Logo height={24} className="mr-3" />
<span
className="mx-2 font-extrabold select-none"
title={`verse.db Logo`}
>
VERSE.DB
</span>
</>
);
},
project: {
link: "https://github.com/jedi-studio/verse.db",
},
navbar: {
extraContent: <Npm />
},
docsRepositoryBase:
"https://github.com/jedi-studio/verse.db.docs/tree/master/",
chat: {
link: "https://discord.gg/EurnFWMweW",
},
banner: {
key: 'session-adapter',
text: (
<a href="https://versedb.jedi-studio.com/docs/adapters" target="_blank">
🪄 New Adapters are released. Check them out →
</a>
)
},
primaryHue: { dark: 230, light: 230 },
primarySaturation: { dark: 45, light: 100 },
sidebar: {
toggleButton: true,
},
head: () => {
const { route, locale } = useRouter();
const router = useRouter();
const { frontMatter, title } = useConfig();
const imageUrl = new URL(
"https://og.jedi-studio.com/api/og/versedb?type=DOCUMENTATION&title=VERSE%2EDB&description=description%2Etest"
);
const ogTitle = title ? `VERSE.DB | ${title}` : `VERSE.DB`;
const adapterTitle = frontMatter.adapter ? `${frontMatter.adapter} ${title}` : `${title}`;
const ogDescription = frontMatter.description
? frontMatter.description
: `verse.db isn't just a database, it's your universal data bridge. Designed for unmatched flexibility, security, and performance, verse.db empowers you to manage your data with ease.`;
if (!/\/index\.+/.test(route)) {
imageUrl.searchParams.set("title", adapterTitle);
imageUrl.searchParams.set("description", ogDescription);
}
const ogImage = frontMatter.image || imageUrl.toString();
return (
<>
{/* Favicons, meta */}
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://i.ibb.co/wRxVjYf/verse-db-circle.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://i.ibb.co/wRxVjYf/verse-db-circle.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://i.ibb.co/wRxVjYf/verse-db-circle.png"
/>
<link
rel="icon"
type="image/svg+xml"
href="https://i.ibb.co/wRxVjYf/verse-db-circle.png"
/>
<link rel="manifest" href="/favicon/site.webmanifest" />
<link
rel="mask-icon"
href="https://i.ibb.co/wRxVjYf/verse-db-circle.png"
color="#000000"
/>
{/* META DATA */}
<meta httpEquiv="Content-Language" content="en" />
<meta name="apple-mobile-web-app-title" content="VERSE.DB" />
<meta name="msapplication-TileColor" content="#0a192f" />
<meta name="twitter:card" content="summary_large_image" />
<meta property="apple-mobile-web-app-title" content="VERSE.DB" />
<meta property="msapplication-TileColor" content="#0a192f" />
<meta property="twitter:card" content="summary_large_image" />
{/* MAIN META TAGS */}
<meta
name="keywords"
content="jedi, studio, verse.db, verse, db, json, sql, yaml, schema, schema-less, docs, data, database, data bridge,"
/>
<meta name="title" content={ogTitle} />
<meta name="description" content={ogDescription} />
<meta name="copyright" content="JEDI Studio." />
<meta name="language" content="EN" />
<meta name="author" content="JEDI Studio." />
<meta name="designer" content="JEDI Studio." />
<meta name="copyright" content="JEDI Studio." />
<meta name="reply-to" content="[email protected]" />
<meta name="owner" content="JEDI Studio." />
<meta name="url" content={`http://jedi-studio.com${router.pathname}`} />
{/* MAIN META TAGS */}
<meta
property="keywords"
content="jedi, studio, verse.db, verse, db, json, sql, yaml, schema, schema-less, docs, data, database, data bridge,"
/>
<meta property="title" content={ogTitle} />
<meta property="description" content={ogDescription} />
<meta property="copyright" content="JEDI Studio." />
<meta property="language" content="EN" />
<meta
property="author"
content="JEDI Studio."
/>
<meta property="designer" content="JEDI Studio." />
<meta property="copyright" content="JEDI Studio." />
<meta property="reply-to" content="[email protected]" />
<meta property="owner" content="JEDI Studio." />
<meta property="url" content={`http://jedi-studio.com${router.pathname}`} />
{/* OG META TAGS WITH NAME*/}
<meta name="og:title" content={ogTitle} />
<meta name="og:type" content="database" />
<meta name="og:url" content={`http://jedi-studio.com${router.pathname}`} />
<meta name="og:image" content={ogImage} />
<meta name="og:site_name" content="JEDI Studio." />
<meta name="og:description" content={ogDescription} />
<meta name="fb:page_id" content="JEDI Studio." />
<meta name="og:email" content="[email protected]" />
<meta name="og:author" content="JEDI Studio." />
{/* OG META TAGS WITH NAME*/}
<meta property="og:title" content={ogTitle} />
<meta property="og:type" content="database" />
<meta property="og:url" content={`http://jedi-studio.com${router.pathname}`} />
<meta property="og:image" content={ogImage} />
<meta property="og:site_name" content="JEDI Studio." />
<meta property="og:description" content={ogDescription} />
<meta property="fb:page_id" content="JEDI Studio." />
<meta property="og:email" content="[email protected]" />
<meta property="og:author" content="JEDI Studio." />
{/* TWITTER OG */}
<meta property="twitter:image" content={ogImage} />
<meta property="twitter:title" content={ogTitle} />
<meta property="twitter:description" content={ogDescription} />
{/* TITLE */}
<title>{ogTitle}</title>
</>
);
},
footer: {
text: "VERSE.DB. Powered by JEDI Studio.",
},
};
export default config;