forked from snaplet/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.tsx
78 lines (76 loc) · 2.04 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
import { useConfig, type DocsThemeConfig } from "nextra-theme-docs";
import { Logo } from "./components/Logo";
import { useRouter } from "next/router";
const themeConfig: DocsThemeConfig = {
chat: {
link: "https://app.snaplet.dev/chat",
},
head: null,
logo: <Logo />,
project: {
link: "https://snaplet.dev",
},
docsRepositoryBase: "https://github.com/snaplet/docs/tree/main",
primaryHue: {
light: 233,
dark: 233,
},
// @ts-expect-error httpEquiv: "Content-Language" is valid
useNextSeoProps() {
const { frontMatter } = useConfig();
const { asPath, defaultLocale, locale } = useRouter();
const url =
"https://docs.snaplet.dev" +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`);
return {
titleTemplate: "%s – Snaplet",
description: frontMatter.description || "Snaplet Documentation",
additionalLinkTags: [
{
href: "/apple-touch-icon.png",
rel: "apple-touch-icon",
sizes: "180x180",
},
{
href: "/favicon-32x32.png",
rel: "icon",
sizes: "32x32",
type: "image/png",
},
{
href: "/favicon-16x16.png",
rel: "icon",
sizes: "16x16",
type: "image/png",
},
{
rel: "manifest",
href: "/site.webmanifest",
},
],
additionalMetaTags: [
{ content: "en", httpEquiv: "Content-Language" },
{
content: "Snaplet Documentation",
name: "apple-mobile-web-app-title",
},
{ content: "#b5bdf6", name: "msapplication-TileColor" },
{ content: "/ms-icon-150x150.png", name: "msapplication-TileImage" },
],
openGraph: {
url,
images: [
{ url: frontMatter.image || "https://docs.snaplet.dev/og.png" },
],
},
twitter: {
cardType: "summary_large_image",
site: "https://docs.snaplet.dev",
},
};
},
sidebar: {
defaultMenuCollapseLevel: 3,
},
};
export default themeConfig;