forked from bwinf-guide/bwinf-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.tsx
66 lines (64 loc) · 1.55 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
import AppFooter from '@components/AppFooter'
import React from 'react'
import { ThemeSwitch, useConfig } from 'nextra-theme-docs'
import { useRouter } from 'next/router'
export default {
logo: <span><strong>BWINF GUIDE</strong></span>,
footer: {
component: AppFooter
},
project: {
link: 'https://github.com/bwinf-guide/bwinf-guide'
},
docsRepositoryBase: "https://github.com/bwinf-guide/bwinf-guide/tree/main",
useNextSeoProps() {
const { asPath } = useRouter()
if (asPath !== '/') {
return {
titleTemplate: '%s - BWINF GUIDE',
}
}
},
head: () => {
const { asPath, defaultLocale, locale } = useRouter()
const { title, frontMatter } = useConfig()
const url =
'https://bwinf.guide' + asPath
return (
<>
<meta property="og:url" content={url} />
<meta
name="og:title"
content={title ? title + ' - BWINF GUIDE' : 'BWINF GUIDE'}
/>
<meta
property="og:description"
content={frontMatter.description || 'Eine Einführung in den Bundeswettbewerb Informatik'}
/>
</>
)
},
primaryHue: 48,
primarySaturation: 100,
themeSwitch: {
useOptions() {
return {
light: 'Hell',
dark: 'Dunkel',
system: 'System'
}
}
},
editLink: {
text: "Diese Seite auf Github bearbeiten →",
},
feedback: {
content: "Fragen? Gib uns ein Feedback →"
},
search: {
placeholder: "Durchsuchen..."
},
navbar: {
extraContent: <><ThemeSwitch lite={true} /></>
}
}