-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme.config.tsx
More file actions
74 lines (64 loc) · 1.63 KB
/
Copy paththeme.config.tsx
File metadata and controls
74 lines (64 loc) · 1.63 KB
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
import Image from "next/image"
import { useRouter } from "next/router"
import { DocsThemeConfig, useConfig } from "nextra-theme-docs"
import React from "react"
const githubUrl = "https://github.com/ColoradoTechCommunity/website/"
const siteName = "Colorado Tech Community"
const config: DocsThemeConfig = {
// Global
docsRepositoryBase: `${githubUrl}tree/main`,
useNextSeoProps() {
const { asPath } = useRouter()
const titleTemplate = asPath === "/" ? siteName : `%s – ${siteName}`
return { titleTemplate }
},
head() {
const { asPath } = useRouter()
const { frontMatter } = useConfig()
const description = frontMatter.description || siteName
const title = frontMatter.title
? `${frontMatter.title} – ${siteName}`
: siteName
const url = `https://coloradotech.community/${asPath}`
return (
<>
<meta property="og:description" content={description} />
<meta property="og:title" content={title} />
<meta property="og:url" content={url} />
<link rel="shortcut icon" type="image/jpg" href="/logo.ico" />
</>
)
},
primaryHue: 208,
// Navbar
logo: (
<>
<Image
src="/logo.png"
alt="Colorado Tech Community logo"
width={50}
height={50}
style={{ marginRight: "10px" }}
/>
<span>{siteName}</span>
</>
),
project: {
link: githubUrl,
},
chat: {
link: "https://discord.gg/KTKQAvK3rR",
},
search: {
placeholder: "🔎 Search",
},
// TOC Sidebar
toc: {
title: "On this page",
},
// Footer
footer: {
text: <p>{siteName}</p>,
},
}
export default config