-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy paththeme.config.tsx
80 lines (76 loc) · 2.33 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
import React from "react";
import { DocsThemeConfig, useConfig } from "nextra-theme-docs";
import { useRouter } from "next/router";
import Logo from "./components/logo";
import { EditThisPageButton } from "./components/EditThisPageButton";
import { Callout } from "./components/core/callout";
const config: DocsThemeConfig = {
logo: <Logo height={32} />,
logoLink: "https://keel.so",
project: {
link: "https://github.com/teamkeel/keel",
},
footer: {
text: <span>© Planko Ltd {new Date().getFullYear()}</span>,
},
editLink: {
component: () => null,
},
feedback: {
useLink: () => null,
content: EditThisPageButton,
},
components: {
h1: (props) => (
<h1
className="nx-mt-2 nx-text-5xl nx-font-bold nx-tracking-tight nx-text-slate-900 dark:nx-text-slate-100"
{...props}
/>
),
// h2: props => <HeadingLink tag="h2" context={context} {...props} />,
// h3: props => <HeadingLink tag="h3" context={context} {...props} />,
// h4: props => <HeadingLink tag="h4" context={context} {...props} />,
// h5: props => <HeadingLink tag="h5" context={context} {...props} />,
// h6: props => <HeadingLink tag="h6" context={context} {...props} />,
ul: (props) => (
<ul
className="nx-mt-6 nx-list-disc first:nx-mt-0 ltr:nx-ml-6 rtl:nx-mr-6"
{...props}
/>
),
ol: (props) => (
<ol
className="nx-mt-6 nx-list-decimal first:nx-mt-0 ltr:nx-ml-6 rtl:nx-mr-6"
{...props}
/>
),
li: (props) => <li className="nx-my-2" {...props} />,
hr: (props) => (
<hr
className="nx-my-8 nx-border-neutral-200/70 contrast-more:nx-border-neutral-400 dark:nx-border-primary-100/10 contrast-more:dark:nx-border-neutral-400"
{...props}
/>
),
p: (props) => (
<p className="nx-mt-6 nx-leading-7 first:nx-mt-0" {...props} />
),
},
sidebar: {
// Makes collapsible menus collapsed by default
defaultMenuCollapseLevel: 1,
},
useNextSeoProps: () => {
const { asPath } = useRouter();
const { frontMatter } = useConfig();
if (asPath !== "/") {
return {
titleTemplate: "%s – Keel",
description:
frontMatter.description ||
"Keel solves the backend puzzle so you can focus on customers.",
};
}
},
head: null,
};
export default config;