-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy paththeme.config.tsx
112 lines (103 loc) · 3.82 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
import React from "react";
import { DocsThemeConfig } from "nextra-theme-docs";
import { useRouter } from "next/router";
import seoConfig from "./seo.config";
const config: DocsThemeConfig = {
logo: (
<img src={"/img/logo.svg"} alt={"WhiteBIT logo"} width={32} height={32} />
),
project: {
link: "https://github.com/whitebit-exchange/api-docs",
},
docsRepositoryBase: "https://github.com/whitebit-exchange/api-docs/blob/main",
color: { hue: 43 },
backgroundColor: {
light: "255,255,255",
dark: "0,0,0",
},
footer: {
component: <div />,
},
head: function useHead() {
const { route } = useRouter();
const pagePath = route === "/" ? "index" : route.replace(/^\//, "");
const pageConfig = seoConfig[pagePath] || {
title: "WhiteBIT API Documentation",
description: "Official WhiteBIT API documentation: integrate, trade, and access market data with ease using our developer-friendly guides and endpoints.",
};
const canonicalUrl = `https://docs.whitebit.com${route}`;
return (
<>
<title>{pageConfig.title}</title>
<meta property="og:title" content={pageConfig.title} />
<meta name="description" content={pageConfig.description} />
<meta property="og:description" content={pageConfig.description} />
<meta property="og:image" content={"/img/og-image.png"} />
<meta property="og:type" content="website" />
<meta property="og:url" content={canonicalUrl} />
<meta property="og:site_name" content="WhiteBIT API Documentation" />
<meta httpEquiv="Content-Language" content="en" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site:domain" content="docs.whitebit.com" />
<meta name="twitter:url" content="https://docs.whitebit.com" />
<meta name="twitter:title" content={pageConfig.title} />
<meta name="twitter:description" content={pageConfig.description} />
<meta name="twitter:image" content={"/img/og-image.png"} />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="keywords" content="WhiteBIT API, cryptocurrency exchange, trading API, crypto trading, API documentation, WebSocket API, REST API" />
<meta name="author" content="WhiteBIT" />
<meta name="robots" content="index, follow" />
<link rel="canonical" href={canonicalUrl} />
<link
rel="apple-mobile-web-app-title"
content="WhiteBIT API Documentation"
/>
<link
rel="shortcut icon"
type="image/x-icon"
href={"/img/favicon.ico"}
/>
<link
rel="icon"
type="image/x-icon"
sizes="16x16"
href={"/img/favicon-16x16.png"}
/>
<link
rel="icon"
type="image/x-icon"
sizes="32x32"
href={"/img/favicon-32x32.png"}
/>
<script type="application/ld+json">
{JSON.stringify({
"@context": "https://schema.org",
"@type": "TechnicalArticle",
"headline": pageConfig.title,
"description": pageConfig.description,
"image": "https://docs.whitebit.com/img/og-image.png",
"author": {
"@type": "Organization",
"name": "WhiteBIT"
},
"publisher": {
"@type": "Organization",
"name": "WhiteBIT",
"logo": {
"@type": "ImageObject",
"url": "https://docs.whitebit.com/img/logo.svg"
}
},
"url": canonicalUrl,
"mainEntityOfPage": {
"@type": "WebPage",
"@id": canonicalUrl
}
})}
</script>
</>
);
},
navigation: false,
};
export default config;