-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.config.tsx
45 lines (38 loc) · 1.37 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
import { useRouter } from "next/router";
import type { DocsThemeConfig } from "nextra-theme-docs";
import { Code } from "@/components/Code";
import { TSTyche } from "@/components/TSTyche";
const config: DocsThemeConfig = {
components: { code: Code },
chat: { link: "https://discord.gg/gCSasd3QJq" },
docsRepositoryBase: "https://github.com/tstyche/tstyche.org/tree/main",
feedback: { content: null },
footer: { text: `Copyright © ${new Date().getFullYear()} TSTyche` },
head: null, // seems like 'useNextSeoProps()' does all the job
logo: TSTyche,
primaryHue: { dark: 206, light: 216 },
project: { link: "https://github.com/tstyche/tstyche" },
sidebar: { toggleButton: true },
useNextSeoProps() {
const { asPath } = useRouter();
const additionalLinkTags = [
{ rel: "icon", href: "/images/favicon.png", type: "image/png" },
{ rel: "icon", href: "/images/favicon.svg", type: "image/svg+xml" },
{ rel: "apple-touch-icon", href: "/images/apple-touch-icon.png" },
];
const openGraph = { images: [{ url: "https://tstyche.org/images/og.png" }] };
if (asPath === "/") {
return {
additionalLinkTags,
openGraph,
title: "TSTyche — The Essential Type Testing Tool",
};
}
return {
additionalLinkTags,
openGraph,
titleTemplate: "%s — TSTyche",
};
},
};
export default config;