Skip to content

Commit efbee62

Browse files
ChengaDevclaude
andcommitted
Add WebApplication and HowTo structured data schemas for SEO
- Upgrade SEO.tsx from SoftwareApplication to WebApplication schema, home page only - Add HowTo schema to Instructions page using localized steps Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5322d52 commit efbee62

2 files changed

Lines changed: 39 additions & 10 deletions

File tree

src/components/Instructions.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react'
2+
import { Helmet } from 'react-helmet'
23
import styled, { keyframes } from 'styled-components'
34
import { useLocalization } from '../contexts/Language/LanguageProvider'
45
import SEO from './SEO'
@@ -17,12 +18,33 @@ const fadeInUp = keyframes`
1718
const Instructions = () => {
1819
const { locals } = useLocalization()
1920

21+
const howToSchema = {
22+
"@context": "https://schema.org",
23+
"@type": "HowTo",
24+
"name": "How to Operate an Online Basketball Shot Clock",
25+
"description": "Step-by-step guide to using a basketball shot clock online, including 24-second and 14-second resets per FIBA rules.",
26+
"step": locals.instructionsSections.map((section) => ({
27+
"@type": "HowToSection",
28+
"name": section.title,
29+
"itemListElement": section.steps.map((step, i) => ({
30+
"@type": "HowToStep",
31+
"position": i + 1,
32+
"text": step,
33+
})),
34+
})),
35+
}
36+
2037
return (
2138
<Container>
2239
<SEO
2340
title="Shot Clock Instructions | ShotClock Pro"
2441
description="Step-by-step instructions for operating a basketball shot clock. Learn the 24-second and 14-second reset rules, basic controls, and game situations per FIBA regulations."
2542
/>
43+
<Helmet>
44+
<script type="application/ld+json">
45+
{JSON.stringify(howToSchema)}
46+
</script>
47+
</Helmet>
2648
<AnimatedTitle>{locals.instructionsTitle}</AnimatedTitle>
2749

2850
<Description>{locals.instructionsDescription}</Description>

src/components/SEO.tsx

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ const SEO: React.FC<SEOProps> = ({ title, description }) => {
2828
return `${BASE_URL}/${lang}${pagePath === '/' ? '' : pagePath}`;
2929
};
3030

31-
const structuredData = {
31+
const isHome = pagePath === '/';
32+
33+
const webAppSchema = {
3234
"@context": "https://schema.org",
33-
"@type": "SoftwareApplication",
35+
"@type": "WebApplication",
3436
"name": "ShotClock Pro",
37+
"url": "https://www.24shotclock.com",
3538
"applicationCategory": "SportsApplication",
36-
"operatingSystem": "Web",
37-
"description": "Professional basketball shot clock training application for referees, scorekeepers, and basketball enthusiasts.",
39+
"operatingSystem": "Any",
40+
"browserRequirements": "Requires JavaScript",
41+
"description": "Free online basketball shot clock — start, stop, reset, and practice with a real buzzer. Works on any device, no installation needed.",
3842
"offers": {
3943
"@type": "Offer",
4044
"price": "0",
@@ -46,10 +50,11 @@ const SEO: React.FC<SEOProps> = ({ title, description }) => {
4650
},
4751
"featureList": [
4852
"24-second shot clock simulation",
49-
"14-second reset functionality",
53+
"14-second offensive rebound reset",
5054
"Real-time operation practice",
51-
"Multiple language support",
52-
"FIBA rules compliance"
55+
"Real-time buzzer sound",
56+
"Blind-clock training mode",
57+
"Multiple language support"
5358
]
5459
};
5560

@@ -68,9 +73,11 @@ const SEO: React.FC<SEOProps> = ({ title, description }) => {
6873
<link key={lang} rel="alternate" hrefLang={lang} href={getLangUrl(lang)} />
6974
))}
7075
<link rel="alternate" hrefLang="x-default" href={getLangUrl('en')} />
71-
<script type="application/ld+json">
72-
{JSON.stringify(structuredData)}
73-
</script>
76+
{isHome && (
77+
<script type="application/ld+json">
78+
{JSON.stringify(webAppSchema)}
79+
</script>
80+
)}
7481
</Helmet>
7582
);
7683
};

0 commit comments

Comments
 (0)