-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy paththeme.config.tsx
More file actions
206 lines (199 loc) · 7.21 KB
/
theme.config.tsx
File metadata and controls
206 lines (199 loc) · 7.21 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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
import dynamic from "next/dynamic";
import { DocsThemeConfig, useConfig } from "nextra-theme-docs";
import AudioPlayer from "./components/AudioPlayer";
import CollaborateSection from "./components/CollaborateSection";
import Logo from "./components/Logo";
import PdfDownloader from "./components/PdfDownloader";
import Showcase from "./components/Showcase";
import VideoPlayer from "./components/VideoPlayer";
const GiscusComments = dynamic(() => import("./components/GiscusComments"), {
ssr: false,
}) as React.FC<any>;
const LiveCodeEditor = dynamic(() => import("./components/LiveCodeEditor"), {
ssr: false,
}) as React.FC<any>;
const Donate = dynamic(() => import("./components/Donate"), {
ssr: false,
}) as React.FC<any>;
const Pitfall = dynamic(() => import("./components/Pitfall"), {
ssr: false,
}) as React.FC<any>;
const Reveal = dynamic(() => import("./components/Reveal"), {
ssr: false,
}) as React.FC<any>;
const Custom404Page = dynamic(() => import("./components/Custom404Page"), {
ssr: false,
}) as React.FC<any>;
const config: DocsThemeConfig = {
logo: <Logo />,
project: {
link: "https://github.com/codebymojnu/react-bangla-tutorial",
},
chat: {
link: "https://discord.gg/k3Ut7nvXWE",
},
docsRepositoryBase:
"https://github.com/codedbyMojnu/react-bangla-tutorial/blob/main",
footer: {
text: `© 2024 - ${new Date().getFullYear()} React JS Bangla Tutorial.`,
},
sidebar: {
defaultMenuCollapseLevel: 1,
toggleButton: true,
},
toc: {
float: true,
title: "এই পৃষ্ঠায়",
},
search: {
placeholder: "খুঁজুন...",
},
editLink: {
text: "গিটহাবে এই পৃষ্ঠাটি সম্পাদনা করুন",
},
feedback: {
content: "এই পৃষ্ঠায় কোন সমস্যা আছে? আমাদের জানান",
},
components: {
Donate,
GiscusComments,
Reveal,
Pitfall,
LiveCodeEditor,
AudioPlayer,
PdfDownloader,
VideoPlayer,
Custom404Page,
Showcase,
CollaborateSection,
},
useNextSeoProps() {
const { frontMatter } = useConfig();
return {
titleTemplate: "%s – React JS Bangla Tutorial",
description:
frontMatter.description ||
"React JS Bangla Tutorial - স্টেপ বাই স্টেপ ফলো করে বাংলা ভাষায় রিয়েক্ট জেএস শিখুন।",
openGraph: {
type: "website",
locale: "bn_BD",
url: "https://react-bangla.vercel.app",
site_name: "React JS Bangla Tutorial",
images: [
{
url:
frontMatter.image ||
"https://react-bangla.vercel.app/icons/react-bangla-icon.png",
width: 1200,
height: 630,
alt: "React JS Bangla Tutorial",
},
],
},
twitter: {
handle: "@codedbymojnu",
site: "@codedbymojnu",
cardType: "summary_large_image",
},
};
},
head: () => {
const { title, frontMatter } = useConfig();
const description =
frontMatter?.description ||
"React JS Bangla Tutorial - স্টেপ বাই স্টেপ ফলো করে বাংলা ভাষায় রিয়েক্ট জেএস শিখুন।";
const url =
typeof window !== "undefined"
? `https://react-bangla.vercel.app${window.location.pathname}`
: "https://react-bangla.vercel.app";
return (
<>
{/* SEO and Meta Tags */}
<meta charSet="UTF-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta httpEquiv="Content-Language" content="bn" />
<meta name="theme-color" content="#ffffff" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
{/* Favicon and App Icons */}
<link rel="icon" href="/icons/react-bangla-icon.png" type="image/png" />
<link rel="apple-touch-icon" href="/icons/react-bangla-icon.png" />
<link
rel="shortcut icon"
href="/icons/react-bangla-icon.png"
type="image/png"
/>
<link rel="manifest" href="/manifest.json" />
<meta
name="keywords"
content={
frontMatter?.keywords ||
"React, Bangla, Tutorial, React JS, Frontend Development, Web Development, JavaScript, Programming, Bangladesh, Learn React, React in Bengali, React tutorial in Bangla, React project, React assignments, React hooks, React router, React query, Axios, React Hook Form, Next.js, Nextra, UI/UX, Developer career, Job posts, System design, Interview preparation"
}
/>
<link rel="canonical" href={url} />
<meta property="og:url" content={url} />
<meta property="og:site_name" content="React JS Bangla Tutorial" />
<meta name="og:title" content={title || "React JS Bangla Tutorial"} />
<meta name="description" content={description} />
<meta property="og:description" content={description} />
<meta
property="og:image"
content={
frontMatter?.image ||
"https://react-bangla.vercel.app/icons/react-bangla-icon.png"
}
/>
<meta property="og:image:alt" content="React JS Bangla Tutorial Logo" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@codedbymojnu" />
<meta name="twitter:creator" content="@codedbymojnu" />
<meta
name="twitter:title"
content={title || "React JS Bangla Tutorial"}
/>
<meta name="twitter:description" content={description} />
<meta
name="twitter:image"
content={
frontMatter?.image ||
"https://react-bangla.vercel.app/icons/react-bangla-icon.png"
}
/>
<meta
name="google-site-verification"
content="-0oyDJ10CwLMNFF2z2zhS90QOrbzypnffqi7A4LkYbU"
/>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: JSON.stringify({
"@context": "https://schema.org",
"@type": "WebSite",
name: "React JS Bangla Tutorial",
url: "https://react-bangla.vercel.app",
description:
"React JS Bangla Tutorial - স্টেপ বাই স্টেপ ফলো করে বাংলা ভাষায় রিয়েক্ট জেএস শিখুন।",
inLanguage: "bn",
publisher: {
"@type": "Organization",
name: "React JS Bangla Tutorial",
logo: {
"@type": "ImageObject",
url: "https://react-bangla.vercel.app/icons/react-bangla-icon.png",
},
},
author: {
"@type": "Person",
name: "Md. Mojnu Miah",
url: "https://github.com/codedbymojnu",
},
}),
}}
/>
</>
);
},
};
export default config;