-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy paththeme.config.tsx
94 lines (87 loc) · 2.66 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
import React from "react";
import { DocsThemeConfig, useConfig } from "nextra-theme-docs";
import { useRouter } from "next/router";
import Logo from "@components/Logo";
import Footer from "./components/Footer";
import { Button } from "./components/ui/button";
const config: DocsThemeConfig = {
logo: <Logo />,
logoLink: "/",
project: {
link: "https://github.com/celest-dev/celest",
},
chat: {
link: "https://discord.gg/KtMAfSDXGQ",
},
darkMode: true,
docsRepositoryBase: "https://github.com/celest-dev/website",
useNextSeoProps() {
return { titleTemplate: "%s | Celest" };
},
head() {
const router = useRouter();
const { asPath } = router;
const url = `https://www.celest.dev${asPath}`;
const { frontMatter, title: defaultTitle } = useConfig();
const title = frontMatter.title ?? defaultTitle;
const fullTitle = `${title} | Celest`;
const description = frontMatter.description || "The Flutter cloud platform";
let ogImage = "https://www.celest.dev/api/og";
if (asPath !== "/") {
ogImage += `?title=${encodeURIComponent(title)}`;
}
return (
<>
<link
rel="apple-touch-icon"
sizes="180x180"
href="/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/favicon-16x16.png"
/>
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<title>{fullTitle}</title>
<meta property="og:url" content={url} />
<meta property="og:title" content={fullTitle} />
<meta property="og:image" content={ogImage} />
<meta property="og:description" content={description} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@celest_dev" />
<meta name="twitter:creator" content="@celest_dev" />
<meta name="twitter:image" content={ogImage} />
<meta name="twitter:image:alt" content={fullTitle} />
<meta name="twitter:title" content={fullTitle} />
<meta name="twitter:description" content={description} />
</>
);
},
banner: {
key: '1.0-release',
text: (
<div className="banner">
Celest 1.0 is officially released with a new Cloud and database! 🚀 <a href="/docs/cloud">Learn more →</a>
</div>
),
dismissible: false,
},
search: {
placeholder: "Search the docs...",
},
footer: {
text: Footer,
},
sidebar: {
defaultMenuCollapseLevel: 1,
},
};
export default config;