-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.config.tsx
66 lines (64 loc) · 1.6 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 React from "react";
import { useRouter } from "next/router";
import { useConfig } from "nextra-theme-docs";
import type { DocsThemeConfig } from "nextra-theme-docs";
import packageJson from "./package.json";
/**
* Nextra Theme Configuration
* https://nextra.site/docs/docs-theme/theme-configuration
*/
const themeConfig: DocsThemeConfig = {
project: {
link: "https://github.com/e-picsa/docs",
},
logo: <strong>PICSA Project</strong>,
docsRepositoryBase: "https://github.com/e-picsa/docs",
head: () => {
const { asPath } = useRouter();
const { frontMatter } = useConfig();
return (
<>
<meta property="og:url" content={`https://picsa.app/${asPath}`} />
<meta property="og:title" content={frontMatter.title || "PICSA"} />
<meta
property="og:description"
content={frontMatter.description || "PICSA Docs"}
/>
</>
);
},
useNextSeoProps() {
const { route } = useRouter();
if (route !== "/") {
return {
titleTemplate: "%s – PICSA",
};
}
},
toc: {
float: true,
title: <strong>On this Page</strong>,
},
darkMode: true,
navigation: {
prev: true,
next: true,
},
footer: {
text: (
<>
<span>
Copyright {new Date().getFullYear()} ©{" "}
<a href="https://picsa.app" target="_blank" rel="noopener noreferrer">
PICSA
</a>
</span>
<span style={{ marginLeft: "auto" }}>v{packageJson.version}</span>
</>
),
},
sidebar: {
defaultMenuCollapseLevel: 1,
},
};
export default themeConfig;