Skip to content

Commit 4602ca5

Browse files
committed
chore: jsonld to main pages
1 parent 1f2c829 commit 4602ca5

File tree

6 files changed

+240
-70
lines changed

6 files changed

+240
-70
lines changed

src/app/(marketing)/faqs/page.tsx

Lines changed: 63 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import CallToActionBlock from '@/components/marketing/global/call-to-action-bloc
22
import FAQsBlock from '@/components/marketing/global/faqs';
33
import Link from 'next/link';
44
import { createMetadata } from '@/utils/seo';
5+
import { FaqJsonLd } from '@/types/Seo';
56

67
export async function generateMetadata() {
78
return createMetadata({
@@ -20,30 +21,35 @@ const commonFaqs = [
2021
{
2122
question: 'What is techblitz?',
2223
answer:
23-
'techblitz is an online platform that helps developers of all abilities to learn and grow. We offer a range of tools and resources to help you become a better developer, including questions, roadmaps, tutorials, and more.',
24+
'TechBlitz is an online platform that helps developers of all abilities to learn and grow. We offer a range of tools and resources to help you become a better developer, including questions, roadmaps, tutorials, and more.',
25+
jsonLdText:
26+
'TechBlitz is an online platform that helps developers of all abilities to learn and grow. We offer a range of tools and resources to help you become a better developer, including questions, roadmaps, tutorials, and more.',
2427
},
2528
{
2629
question: 'Is techblitz open source?',
2730
answer: (
2831
<>
29-
Yes! techblitz is open source. You can find our source{' '}
32+
Yes! TechBlitz is open source. You can find our source{' '}
3033
<a href="https://git.new/blitz" target="_blank" className="text-accent">
3134
here
3235
</a>
3336
.
3437
</>
3538
),
39+
jsonLdText: 'Yes! TechBlitz is open source. You can find our source here.',
3640
},
3741
{
3842
question: 'Is techblitz free to use?',
3943
answer:
40-
'Yes, techblitz will be free to use. You will be able to sign up for a free account and start using our software right away.',
44+
'Yes, TechBlitz will be free to use. You will be able to sign up for a free account and start using our software right away.',
45+
jsonLdText:
46+
'Yes, TechBlitz will be free to use. You will be able to sign up for a free account and start using our software right away.',
4147
},
4248
{
4349
question: 'What will you be adding to techblitz in the future?',
4450
answer: (
4551
<>
46-
We are always working on new features and improvements to techblitz. You
52+
We are always working on new features and improvements to TechBlitz. You
4753
can find our roadmap{' '}
4854
<a href="/roadmap" className="text-accent">
4955
here
@@ -52,40 +58,49 @@ const commonFaqs = [
5258
you may have.
5359
</>
5460
),
61+
jsonLdText:
62+
'We are always working on new features and improvements to TechBlitz. You can find our roadmap here.',
5563
},
5664
{
5765
question: 'What are the benefits of using techblitz?',
5866
answer:
5967
'We offer short-form questions on various topics to help you learn and grow.',
68+
jsonLdText:
69+
'We offer short-form questions on various topics to help you learn and grow.',
6070
},
6171
{
6272
question: 'How do I get started with techblitz?',
6373
answer: (
6474
<>
65-
To get started with techblitz, simply sign up for a free account. You
75+
To get started with TechBlitz, simply sign up for a free account. You
6676
can sign up{' '}
6777
<Link href="/signup" className="text-accent">
6878
here
6979
</Link>
7080
.
7181
</>
7282
),
83+
jsonLdText:
84+
'To get started with TechBlitz, simply sign up for a free account. You can sign up here.',
7385
},
7486
{
7587
question: 'Can I contribute to techblitz?',
7688
answer: (
7789
<>
78-
Yes! You can contribute to techblitz by submitting a pull request on our{' '}
90+
Yes! You can contribute to TechBlitz by submitting a pull request on our{' '}
7991
<a href="https://git.new/blitz" target="_blank" className="text-accent">
8092
GitHub repository
8193
</a>
8294
.
8395
</>
8496
),
97+
jsonLdText:
98+
'Yes! You can contribute to TechBlitz by submitting a pull request on our GitHub repository.',
8599
},
86100
{
87101
question: 'Can I get a refund?',
88102
answer: 'Yes, you can get a refund within 14 days of your purchase. ',
103+
jsonLdText: 'Yes, you can get a refund within 14 days of your purchase. ',
89104
},
90105
{
91106
question:
@@ -99,6 +114,8 @@ const commonFaqs = [
99114
.
100115
</>
101116
),
117+
jsonLdText:
118+
'If you have any other questions, feel free to reach out to us at team@techblitz.dev.',
102119
},
103120
{
104121
question: 'Do you offer a student discount?',
@@ -114,6 +131,8 @@ const commonFaqs = [
114131
February 2025, after which the discount will be 30%.
115132
</>
116133
),
134+
jsonLdText:
135+
'Yes! We believe that TechBlitz should be available to all students. To claim your discount, please email us at team@techblitz.dev using your student email address.',
117136
},
118137
];
119138

@@ -202,26 +221,45 @@ const userRoadmapsFaqs = [
202221
];
203222

204223
export default function FAQsPage() {
224+
const faqJsonLd: FaqJsonLd = {
225+
'@context': 'https://schema.org',
226+
'@type': 'FAQPage',
227+
mainEntity: commonFaqs.map((faq) => ({
228+
'@type': 'Question',
229+
name: faq.question,
230+
acceptedAnswer: {
231+
'@type': 'Answer',
232+
text: faq.jsonLdText,
233+
},
234+
})),
235+
};
236+
205237
return (
206-
<div className="pt-32 pb-24 md:pb-20 md:pt-32 xl:pt-40 xl:pb-32">
207-
<div className="flex flex-col gap-y-10">
208-
<FAQsBlock
209-
title="Most commonly asked questions"
210-
description="Got a question? We have an answer. Here are some of the most commonly asked questions about techblitz."
211-
faqs={commonFaqs}
212-
/>
213-
<FAQsBlock
214-
title="Questions about our plans"
215-
faqs={planFaqs}
216-
showSpan={false}
217-
/>
218-
<FAQsBlock
219-
title="Coding Roadmaps"
220-
faqs={userRoadmapsFaqs}
221-
showSpan={false}
222-
/>
238+
<>
239+
<script
240+
type="application/ld+json"
241+
dangerouslySetInnerHTML={{ __html: JSON.stringify(faqJsonLd) }}
242+
/>
243+
<div className="pt-32 pb-24 md:pb-20 md:pt-32 xl:pt-40 xl:pb-32">
244+
<div className="flex flex-col gap-y-10">
245+
<FAQsBlock
246+
title="Most commonly asked questions"
247+
description="Got a question? We have an answer. Here are some of the most commonly asked questions about techblitz."
248+
faqs={commonFaqs}
249+
/>
250+
<FAQsBlock
251+
title="Questions about our plans"
252+
faqs={planFaqs}
253+
showSpan={false}
254+
/>
255+
<FAQsBlock
256+
title="Coding Roadmaps"
257+
faqs={userRoadmapsFaqs}
258+
showSpan={false}
259+
/>
260+
</div>
261+
<CallToActionBlock title="The smarter way to stay on top of tech" />
223262
</div>
224-
<CallToActionBlock title="The smarter way to stay on top of tech" />
225-
</div>
263+
</>
226264
);
227265
}

src/app/(marketing)/features/daily-coding-challenges/page.tsx

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import FAQsBlock from '@/components/marketing/global/faqs';
77
import { MobileIcon } from '@radix-ui/react-icons';
88
import FeatureLeftRightSection from '@/components/marketing/features/daily-challenge/feature-left-right/features-section';
99

10-
import { createMetadata } from '@/utils/seo';
10+
import { createMetadata, WebPageJsonLdBreadcrumb } from '@/utils/seo';
11+
import { getBaseUrl } from '@/utils';
12+
import { WebPageJsonLd } from '@/types/Seo';
1113

1214
export async function generateMetadata() {
1315
return createMetadata({
@@ -184,17 +186,55 @@ const faqs = [
184186
];
185187

186188
export default function FeatureDailyQuestionPage() {
187-
return (
188-
<div className="container">
189-
<FeatureDailyChallengeHero />
190-
<FeatureLeftRightSection />
189+
const jsonLd: WebPageJsonLd = {
190+
'@context': 'https://schema.org',
191+
'@type': 'WebPage',
192+
url: getBaseUrl(),
193+
headline: 'Daily Coding Challenges | TechBlitz',
194+
description: 'Daily coding challenges to improve your coding skills.',
195+
image:
196+
'https://opengraph.b-cdn.net/production/images/cd5047e6-d495-4666-928e-37d9e52e1806.png?token=hJkK0Ghd13chZ2eBfAOxNQ8ejBMfE_oTwEuHkvxu9aQ&height=667&width=1200&expires=33269844531',
197+
breadcrumb: WebPageJsonLdBreadcrumb,
198+
author: {
199+
'@type': 'Organization',
200+
name: 'TechBlitz',
201+
url: getBaseUrl(),
202+
},
203+
dateModified: new Date().toISOString(),
204+
datePublished: new Date().toISOString(),
205+
mainEntityOfPage: {
206+
'@type': 'WebPage',
207+
'@id': getBaseUrl(),
208+
},
209+
keywords:
210+
'learn to code, learn to code for free, learn javascript, coding challenges, daily coding challenges, web development, tech skills assessment, learn to code on phone',
211+
publisher: {
212+
'@type': 'Organization',
213+
name: 'TechBlitz',
214+
logo: {
215+
'@type': 'ImageObject',
216+
url: 'https://techblitz.dev/favicon.ico',
217+
},
218+
},
219+
};
191220

192-
<MarketingContentGrid title="Learn to code, faster." items={items} />
193-
<FAQsBlock faqs={faqs} />
194-
<CallToActionBlock
195-
title="The fastest way to master coding."
196-
description="Daily coding challenges designed to make you a better developer, faster."
221+
return (
222+
<>
223+
<script
224+
type="application/ld+json"
225+
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
197226
/>
198-
</div>
227+
<div className="container">
228+
<FeatureDailyChallengeHero />
229+
<FeatureLeftRightSection />
230+
231+
<MarketingContentGrid title="Learn to code, faster." items={items} />
232+
<FAQsBlock faqs={faqs} />
233+
<CallToActionBlock
234+
title="The fastest way to master coding."
235+
description="Daily coding challenges designed to make you a better developer, faster."
236+
/>
237+
</div>
238+
</>
199239
);
200240
}

src/app/(marketing)/features/roadmap/page.tsx

Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ import MarketingContentGrid, {
1717
} from '@/components/marketing/global/content-grid';
1818

1919
import { MobileIcon } from '@radix-ui/react-icons';
20-
import { createMetadata } from '@/utils/seo';
20+
import { createMetadata, WebPageJsonLdBreadcrumb } from '@/utils/seo';
21+
import { WebPageJsonLd } from '@/types/Seo';
22+
import { getBaseUrl } from '@/utils';
2123

2224
export async function generateMetadata() {
2325
return createMetadata({
@@ -150,24 +152,62 @@ const featureShowcaseItems: MarketingContentGridProps[] = [
150152
];
151153

152154
export default function FeatureDailyQuestionPage() {
155+
const jsonLd: WebPageJsonLd = {
156+
'@context': 'https://schema.org',
157+
'@type': 'WebPage',
158+
url: getBaseUrl(),
159+
headline: 'Roadmap | TechBlitz',
160+
description:
161+
'Create your own coding progression paths with our personalized roadmaps.',
162+
image: 'https://techblitz.dev/favicon.ico',
163+
breadcrumb: WebPageJsonLdBreadcrumb,
164+
author: {
165+
'@type': 'Organization',
166+
name: 'TechBlitz',
167+
url: getBaseUrl(),
168+
},
169+
dateModified: new Date().toISOString(),
170+
datePublished: new Date().toISOString(),
171+
mainEntityOfPage: {
172+
'@type': 'WebPage',
173+
'@id': getBaseUrl(),
174+
},
175+
keywords:
176+
'learn to code, learn to code for free, learn javascript, coding challenges, daily coding challenges, web development, tech skills assessment, learn to code on phone',
177+
publisher: {
178+
'@type': 'Organization',
179+
name: 'TechBlitz',
180+
logo: {
181+
'@type': 'ImageObject',
182+
url: 'https://techblitz.dev/favicon.ico',
183+
},
184+
},
185+
};
186+
153187
return (
154-
<div className="container">
155-
<FeatureRoadmapHeroBlock />
156-
<FeatureRoadmapCustomizationBlock />
157-
<FeatureRoadmapThreeGridBlock />
158-
<MarketingContentGrid
159-
title="All of this and more."
160-
items={featureShowcaseItems}
161-
/>
162-
<FAQsBlock faqs={faqs} />
163-
<CallToActionBlock
164-
title="Personalized coding for everyone."
165-
description="Create your own progression path with our personalized roadmaps, designed to help you grow as a developer."
166-
leftCta={{
167-
title: 'Get Started',
168-
href: '/signup',
169-
}}
188+
<>
189+
<script
190+
type="application/ld+json"
191+
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
170192
/>
171-
</div>
193+
<div className="container">
194+
<FeatureRoadmapHeroBlock />
195+
<FeatureRoadmapCustomizationBlock />
196+
<FeatureRoadmapThreeGridBlock />
197+
<MarketingContentGrid
198+
title="All of this and more."
199+
items={featureShowcaseItems}
200+
/>
201+
<FAQsBlock faqs={faqs} />
202+
<CallToActionBlock
203+
title="Personalized coding for everyone."
204+
description="Create your own progression path with our personalized roadmaps, designed to help you grow as a developer."
205+
leftCta={{
206+
title: 'Get Started',
207+
href: '/signup',
208+
}}
209+
/>
210+
</div>
211+
</>
172212
);
173213
}

0 commit comments

Comments
 (0)