-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.tsx
101 lines (92 loc) · 2.49 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
import React from "react";
import { DocsThemeConfig } from "nextra-theme-docs";
import { useRouter } from "next/router";
import { useConfig } from "nextra-theme-docs";
const config: DocsThemeConfig = {
logo: (
<>
<img
src="https://aalhommada.com/images/logo.svg"
alt="aalhommada logo"
style={{
width: "25px",
height: "25px",
backgroundColor: "red",
borderRadius: "10px",
padding: "3px",
}}
/>
<span style={{ marginLeft: ".4em", fontWeight: 800 }}>aalhommada</span>
</>
),
faviconGlyph: "A",
useNextSeoProps() {
const { frontMatter } = useConfig();
const { asPath } = useRouter();
if (asPath !== "/") {
return {
titleTemplate: "%s | Js algorithms and data structure",
defaultTitle: "Javascript Algorithms and Data Structure",
description:
frontMatter.description ||
"aalhommada: Js algorithms and data structure",
};
}
},
head: () => {
const { asPath, defaultLocale, locale } = useRouter();
const { frontMatter } = useConfig();
const url =
"https://dsa.aalhommada.com" +
(defaultLocale === locale ? asPath : `/${locale}${asPath}`);
return (
<>
<meta property="og:url" content={url} />
<meta property="og:title" content={frontMatter.title || "Abdullah"} />
<meta
property="og:description"
content={frontMatter.description || "Algorithms and data structure"}
/>
</>
);
},
project: {
link: "https://github.com/aalhommada/javascript-algorithms-and-data-structure.git",
},
docsRepositoryBase:
"https://github.com/aalhommada/javascript-algorithms-and-data-structure.git",
feedback: {
content: null,
},
editLink: {
text: null,
},
search: { placeholder: "Search Algorithms .." },
gitTimestamp: null,
sidebar: {
titleComponent({ title, type }) {
if (type === "separator") {
return <span className="cursor-default">{title}</span>;
}
return <>{title}</>;
},
defaultMenuCollapseLevel: 1,
autoCollapse: false,
},
footer: {
text: (
<span>
{new Date().getFullYear()} ©{" "}
<a
href="https://aalhommada.com/"
target="_blank"
style={{ color: "red", marginRight: "5px" }}
>
aalhommada
</a>
<span>Javascript algorithms and data structure</span>
</span>
),
},
};
export default config;