-
Notifications
You must be signed in to change notification settings - Fork 1
/
theme.config.js
157 lines (156 loc) · 4.66 KB
/
theme.config.js
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
import { useRouter } from "next/router";
const TITLE_WITH_TRANSLATIONS = {
"en-US": "Technical Interview Questions",
};
const FEEDBACK_LINK_WITH_TRANSLATIONS = {
"en-US": "Question? Give us feedback →",
};
const HEADING_WITH_TRANSLATIONS = {
"en-US": "Interview Questions",
};
export default {
projectLink: "https://github.com/jobayer977/questionsi.com",
docsRepositoryBase: "https://github.com/jobayer977/questionsi.com",
titleSuffix: " – questionsi.com",
search: true,
unstable_flexsearch: true,
floatTOC: true,
feedbackLink: () => {
const { locale } = useRouter();
return (
FEEDBACK_LINK_WITH_TRANSLATIONS[locale] ||
FEEDBACK_LINK_WITH_TRANSLATIONS["en-US"]
);
},
feedbackLabels: "feedback",
logo: () => {
const { locale } = useRouter();
return (
<>
<img className="h-5 w-5 " src="/logo.svg" alt="" />
<span
className="mx-2 font-extrabold hidden md:inline select-none"
title={"questionsi.com: " + (TITLE_WITH_TRANSLATIONS[locale] || "")}
>
{HEADING_WITH_TRANSLATIONS[locale] || "questionsi.com"}
</span>
</>
);
},
head: ({ title, meta }) => {
const { route } = useRouter();
const ogImage =
meta.image ||
`https://questionsi.com.org${
/\/index\.+/.test(route) ? "" : "?title=" + encodeURIComponent(title)
}`;
return (
<>
{/* Favicons, meta */}
<link
rel="apple-touch-icon"
sizes="180x180"
href="/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicon/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/favicon/favicon-16x16.png"
/>
<link rel="icon" type="image/svg+xml" href="/favicon/favicon.svg" />
<link rel="manifest" href="/favicon/site.webmanifest" />
<link
rel="mask-icon"
href="/favicon/safari-pinned-tab.svg"
color="#000000"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta httpEquiv="Content-Language" content="en" />
<meta
name="description"
content={
meta.description ||
"Technical Interview Questions - Deep dive into concepts of each aspect."
}
/>
<meta
name="og:description"
content={
meta.description ||
"Technical Interview Questions - Deep dive into concepts of each aspect."
}
/>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@vercel" />
<meta name="twitter:image" content={ogImage} />
<meta
name="og:title"
content={
title
? title + " – questionsi.com"
: "Becoming a Backend Pro: A Guide to Server-side Development"
}
/>
<meta name="og:image" content={ogImage} />
<meta name="apple-mobile-web-app-title" content="questionsi.com" />
<script
lang="javascript"
dangerouslySetInnerHTML={{
__html: `if (!window.localStorage.getItem("theme_default")) {
window.localStorage.setItem("theme", "dark");
window.localStorage.setItem("theme_default", "dark");
document.documentElement.classList.add("dark");
document.documentElement.classList.remove("light");
}`,
}}
/>
;
</>
);
},
footerEditLink: ({ locale }) => {
switch (locale) {
case "es-ES":
return "GitHub → এই পৃষ্ঠাটি সম্পাদনা করুন →";
default:
return "Edit this page on GitHub →";
}
},
footerText: ({ locale }) => {
switch (locale) {
case "es-ES":
return (
<a
href="https://twitter.com/jobayerdev"
target="_blank"
rel="noopener"
className="inline-flex items-center no-underline text-current font-semibold"
>
<span className="mr-2">দ্বারা চালিত - জো</span>
</a>
);
default:
return (
<a
href="https://twitter.com/jobayerdev"
target="_blank"
rel="noopener"
className="inline-flex items-center no-underline text-current font-semibold"
>
<span className="mr-1">Powered by - Jo</span>
</a>
);
}
},
// i18n: [
// { locale: "en-US", text: "English" },
// { locale: "es-ES", text: "Español" },
// ],
};