Skip to content

Commit e345eb4

Browse files
authored
feat: add BreadcrumbList structured data to enhance SEO and navigation
1 parent f2e88ee commit e345eb4

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

src/layouts/ServiceLayout.astro

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,30 @@ const structuredData = {
226226
cssSelector: ["h1", ".hero-subheadline", ".service-intro"],
227227
},
228228
},
229+
{
230+
"@type": "BreadcrumbList",
231+
"@id": `${canonicalUrl}#breadcrumb`,
232+
itemListElement: [
233+
{
234+
"@type": "ListItem",
235+
position: 1,
236+
name: "Home",
237+
item: `${siteUrl}/`,
238+
},
239+
{
240+
"@type": "ListItem",
241+
position: 2,
242+
name: "Services",
243+
item: `${siteUrl}/services/`,
244+
},
245+
{
246+
"@type": "ListItem",
247+
position: 3,
248+
name: serviceName,
249+
item: canonicalUrl,
250+
},
251+
],
252+
},
229253
...(normalizedFaqs.length > 0
230254
? [
231255
{
@@ -442,7 +466,6 @@ const structuredData = {
442466

443467
<script>
444468
import "../scripts/code-copy.ts";
445-
import "../scripts/homepage.ts";
446469
</script>
447470
</body>
448471
</html>

0 commit comments

Comments
 (0)