Repository navigation
Expand file tree
/
Copy paththeme.config.jsx
More file actions
81 lines (79 loc) · 2.07 KB
/
Copy paththeme.config.jsx
File metadata and controls
81 lines (79 loc) · 2.07 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
import { useRouter } from "next/router";
import { useConfig } from "nextra-theme-docs";
import React from "react";
export default {
logo: (
<>
<img src="/images/favicon.svg" width="36px"></img>
<span style={{ fontWeight: 600, fontSize: 20 }}>
cosmology
</span>
</>
),
logoLink: "https://docs.cosmology.zone",
project: {
link: "https://github.com/cosmology-tech",
},
editLink: {
text: "Edit this page →",
},
feedback: {
content: "Go to project Github →",
useLink: () => {
const { asPath } = useRouter();
const head = "https://github.com/cosmology-tech";
const project = asPath.split("/")[1];
switch (project) {
case "ts-codegen":
return "https://github.com/CosmWasm/ts-codegen";
default:
return `${head}/${project}`;
}
},
},
docsRepositoryBase: "https://github.com/cosmology-tech/docs/tree/main",
chat: {
link: "https://discord.gg/6hy8KQ9aJY",
},
head: () => {
const { asPath, defaultLocale, locale } = useRouter();
const { title } = useConfig();
const url =
"https://docs.cosmology.zone" +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`);
const _title = asPath !== "/" ? `${title} - Cosmology` : `${title}`;
return (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:url" content={url} />
<meta property="og:title" content={_title} />
<meta property="og:description" content={"Web3 Products Provider"} />
<link rel="icon" type="image/x-icon" href="/images/favicon.svg" />
<title>{_title}</title>
</>
);
},
sidebar: {
defaultMenuCollapseLevel: 2,
},
primaryHue: {
light: 260,
dark: 265,
},
primarySaturation: {
light: 75,
dark: 100,
},
useNextSeoProps() {
const { asPath } = useRouter();
if (asPath !== "/") {
return {
titleTemplate: "%s – Cosmology",
};
} else {
return {
titleTemplate: "%s",
};
}
},
};