-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy paththeme.config.jsx
94 lines (88 loc) · 2.15 KB
/
theme.config.jsx
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
import { useRouter } from 'next/router';
import Docsearch from './components/docsearch';
export default {
useNextSeoProps() {
const { asPath } = useRouter();
const appName = 'belajarfrontend.org';
const seo = {
titleTemplate: `%s – ${appName}`,
openGraph: {
type: 'website',
url: 'https://belajarfrontend.org',
site_name: appName,
description: 'Belajar pengembangan front-end dengan penuh kebebasan.',
images: [
{
url: 'https://belajarfrontend.org/belajarfrontend-og.png',
},
],
},
};
let seoPage = {};
if (asPath.startsWith('/vim')) {
seoPage = {
titleTemplate: `%s – Vim Esensial – ${appName}`,
};
} else if (asPath.startsWith('/nextjs')) {
seoPage = {
titleTemplate: `%s – Next.js Esensial – ${appName}`,
};
} else if (asPath.startsWith('/tailwind')) {
seoPage = {
titleTemplate: `%s – Tailwind Esensial – ${appName}`,
};
}
if (asPath !== '/') {
seoPage = {
...seoPage,
openGraph: {
...seo.openGraph,
url: `https://belajarfrontend.org${asPath}`,
},
};
}
return {
...seo,
...seoPage,
};
},
logo: (
<div style={{ display: 'flex', alignItems: 'center' }}>
<img src="/logo.png" width="35" alt="logo belajarfrontend.org" />
<span
style={{ marginLeft: 10, fontWeight: 600 }}
className="hidden md:block">
belajarfrontend.org
</span>
</div>
),
project: {
link: 'https://github.com/nauvalazhar/front-end',
},
search: {
component: <Docsearch />,
},
docsRepositoryBase: 'https://github.com/nauvalazhar/front-end/tree/main',
toc: {
title: 'Dalam Bab Ini',
backToTop: true,
},
editLink: {
text: 'Edit halaman ini →',
},
feedback: {
content: null,
},
footer: {
text: 'Nauval © 2024',
},
head: (
<>
<meta name="shortcut icon" content="/favicon.ico" />
<meta
name="description"
content="Belajar pengembangan front-end dengan penuh kebebasan."
/>
</>
),
};