-
Notifications
You must be signed in to change notification settings - Fork 13
/
theme.config.tsx
143 lines (137 loc) · 7.84 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import { Footer } from '@components/Footer'
import { useRouter } from 'next/router'
import { type DocsThemeConfig } from 'nextra-theme-docs'
import React from 'react'
import { Feedback } from './components/Feedback'
const logo = (
<div className="logo-container">
<svg width="143" height="32" viewBox="0 0 143 32" fill="none">
<path
d="M15.8003 31.6007C24.5266 31.6007 31.6007 24.5266 31.6007 15.8003C31.6007 7.07405 24.5266 0 15.8003 0C7.07405 0 0 7.07405 0 15.8003C0 24.5266 7.07405 31.6007 15.8003 31.6007Z"
fill="#1A1E22"
></path>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M20.2458 17.7818L21.4347 18.471L22.6236 19.1602C22.8993 19.3153 23.0888 19.6254 23.0716 19.9528V22.6924C23.0716 23.0198 22.8993 23.3127 22.6236 23.485L21.4347 24.1743L20.2458 24.8635C19.9701 25.0358 19.6255 25.0358 19.3325 24.8635L18.1436 24.1743L16.9547 23.485C16.6791 23.33 16.4895 23.0198 16.5068 22.6924V20.1079L10.9585 16.903L12.0441 18.5227L10.6829 19.3153C10.4072 19.4876 10.0626 19.4876 9.76964 19.3153L8.58074 18.6261L7.39184 17.9368C7.11615 17.7818 6.94385 17.4888 6.94385 17.1615V14.4046C6.94385 14.0772 7.11615 13.7843 7.39184 13.612L8.58074 12.9228L9.76964 12.2336C10.0453 12.0612 10.3899 12.0612 10.6829 12.2336L11.8718 12.9228L12.9228 13.5258L16.5068 11.4582V8.89084C16.5068 8.56346 16.6791 8.27055 16.9547 8.09824L18.1436 7.40902L19.3325 6.7198C19.6082 6.5475 19.9528 6.5475 20.2458 6.7198L21.4347 7.40902L22.6236 8.09824C22.8993 8.25332 23.0888 8.56346 23.0716 8.89084V11.6305C23.0716 11.9579 22.8993 12.2508 22.6236 12.4231L21.4347 13.1123L20.2458 13.8015C19.9701 13.9738 19.6255 13.9738 19.3325 13.8015L18.1436 13.1123L18.0747 13.0778L19.3325 11.2342L17.1098 12.5265L13.5259 14.5941V17.0236L17.1098 19.0913L18.1609 18.4882L19.3498 17.799C19.6082 17.6095 19.9701 17.6267 20.2458 17.7818Z"
fill="white"
></path>
<path
d="M54.5689 18.5227C54.5689 22.21 51.8637 25.2081 48.4693 25.2081C46.4016 25.2081 44.8336 24.2604 43.9032 22.6408V24.9497H41.0085V6.61646H43.9204V14.4563C44.8336 12.8367 46.4016 11.889 48.4865 11.889C51.8809 11.8717 54.5689 14.8354 54.5689 18.5227ZM51.7086 18.5227C51.7086 16.3689 50.0028 14.6458 47.8317 14.6458C45.5746 14.6458 43.9032 16.3172 43.9032 18.5227C43.9032 20.7454 45.5746 22.434 47.8317 22.434C50.02 22.434 51.7086 20.6937 51.7086 18.5227Z"
fill="#1A1E22"
></path>
<path
d="M69.4042 18.5572C69.4042 22.3479 66.4923 25.2082 62.7533 25.2082C59.0143 25.2082 56.1196 22.3479 56.1196 18.5572C56.1196 14.7665 58.9971 11.8718 62.7533 11.8718C66.5095 11.8718 69.4042 14.7493 69.4042 18.5572ZM58.9971 18.5572C58.9971 20.7283 60.6167 22.3996 62.7361 22.3996C64.8554 22.3996 66.5095 20.7283 66.5095 18.5572C66.5095 16.3517 64.8554 14.6804 62.7361 14.6804C60.6167 14.6804 58.9971 16.3517 58.9971 18.5572Z"
fill="#1A1E22"
></path>
<path
d="M75.6073 14.9044V20.0563C75.6073 21.676 76.6066 22.3307 78.0195 22.3307C78.3297 22.3307 78.6743 22.2962 78.9672 22.2273V24.9325C78.5192 25.0359 77.8645 25.0876 77.3992 25.0876C74.5734 25.0876 72.6781 23.3645 72.6781 20.108V14.9044H70.2486V12.1303H72.6781V8.70142H75.6073V12.1303H78.9672V14.9044H75.6073Z"
fill="#1A1E22"
></path>
<path
d="M94.8364 18.5572C94.8364 22.2446 92.1312 25.2082 88.7368 25.2082C86.6692 25.2082 85.1012 24.2605 84.1707 22.6409V29.4297H81.2588V12.1303H84.1707V14.4392C85.0839 12.8195 86.6519 11.8718 88.7368 11.8718C92.1312 11.8718 94.8364 14.8527 94.8364 18.5572ZM91.9761 18.5572C91.9761 16.3862 90.2703 14.6459 88.0993 14.6459C85.8421 14.6459 84.1707 16.3173 84.1707 18.5572C84.1707 20.7627 85.8421 22.4341 88.0993 22.4341C90.2703 22.4341 91.9761 20.6938 91.9761 18.5572Z"
fill="#1A1E22"
></path>
<path
d="M104.865 12.0269V14.6976C104.451 14.5942 104.003 14.5081 103.59 14.5081C101.729 14.5081 100.212 15.7831 100.212 18.092V24.9325H97.3004V12.1303H100.212V13.8361C100.97 12.6127 102.142 11.8718 103.676 11.8718C104.055 11.8718 104.468 11.958 104.865 12.0269Z"
fill="#1A1E22"
></path>
<path
d="M118.098 19.5048H108.276C108.638 21.3829 109.947 22.5718 112.015 22.5718C113.583 22.5718 114.824 21.8309 115.082 20.7454H118.011C117.546 23.4506 115.099 25.2253 111.963 25.2253C108.224 25.2253 105.312 22.3133 105.312 18.4882C105.312 14.7664 108.224 11.8889 111.912 11.8889C115.375 11.8889 118.166 14.5424 118.166 18.2814C118.166 18.6088 118.149 19.2636 118.098 19.5048ZM114.996 17.0064C114.738 15.5418 113.497 14.5252 111.739 14.5252C110.016 14.5252 108.759 15.4384 108.328 17.0064H114.996Z"
fill="#1A1E22"
></path>
<path
d="M119.752 20.8317H122.56C122.664 21.9516 123.766 22.6926 125.214 22.6926C126.627 22.6926 127.471 22.0895 127.471 21.1935C127.471 18.4366 120.062 20.6766 120.062 15.8004C120.062 13.5776 121.923 11.8718 124.904 11.8718C127.557 11.8718 129.849 13.2847 130.142 15.8865H127.212C127.075 15.025 126.196 14.3186 124.852 14.3186C123.697 14.3186 122.888 14.8182 122.888 15.6281C122.888 18.2126 130.331 15.8348 130.331 21.1763C130.331 23.4852 128.212 25.2082 125.386 25.2082C122.198 25.2082 120.01 23.5885 119.752 20.8317Z"
fill="#1A1E22"
></path>
<path
d="M131.71 20.8317H134.518C134.622 21.9516 135.724 22.6926 137.172 22.6926C138.585 22.6926 139.429 22.0895 139.429 21.1935C139.429 18.4366 132.02 20.6766 132.02 15.8004C132.02 13.5776 133.881 11.8718 136.861 11.8718C139.515 11.8718 141.807 13.2847 142.1 15.8865H139.17C139.033 15.025 138.154 14.3186 136.81 14.3186C135.655 14.3186 134.846 14.8182 134.846 15.6281C134.846 18.2126 142.289 15.8348 142.289 21.1763C142.289 23.4852 140.17 25.2082 137.344 25.2082C134.174 25.2082 131.985 23.5885 131.71 20.8317Z"
fill="#1A1E22"
></path>
</svg>
<span>DOCS</span>
<style>{`
.logo-container {
display: inline-flex;
opacity: 1;
align-items: flex-end;
}
.logo-container span{
font-weight: 600;
margin-bottom: 2px;
margin-left: 6px;
text-transform: uppercase;
font-size: 16px;
letter-spacing: 0.06em;
color: var(--color-primary);
}
html.dark .logo-container svg{
filter: invert(1);
}
.logo-container:hover {
opacity: .8
transition: opacity 200ms;
}
`}</style>
</div>
)
const docsRepositoryBase = 'https://github.com/botpress/documentation/tree/master'
const nonEditablePages = ['pages/api-documentation/index.mdx']
const config: DocsThemeConfig = {
toc: {
extraContent: <Feedback />
},
feedback: {
content: undefined
},
project: {
link: undefined,
},
logo,
docsRepositoryBase,
primaryHue: { dark: 217, light: 217 },
head: function useHead() {
const { pathname } = useRouter()
return (
<>
<meta name="theme-color" content="#fff" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta httpEquiv="Content-Language" content="en" />
<link rel="icon" href="/docs/favicon.svg" type="image/svg+xml" />
<link rel="canonical" href={`https://botpress.com/docs${pathname}`} />
<link rel="icon" href="/docs/favicon.png" type="image/png" />
</>
)
},
useNextSeoProps() {
return {
titleTemplate: '%s - Botpress Documentation',
}
},
sidebar: {
titleComponent({ title, type }) {
if (type === 'separator') {
return <span className="cursor-default">{title}</span>
}
return <>{title}</>
},
defaultMenuCollapseLevel: 1,
toggleButton: true,
},
footer: {
text: (
<div className="flex w-full flex-col items-center ">
<Footer />
</div>
),
},
editLink: {
component: ({ filePath, className }) =>
!filePath || nonEditablePages?.includes(filePath) ? null : (
<a href={`${docsRepositoryBase}/${filePath}`} className={className}>
Edit this page
</a>
),
},
}
export default config