Author Not Found
- We couldn't find a public author page for “{id}”. + We couldn't find a public author page for "{id}".
- + ← Back to Blog @@ -309,6 +330,10 @@ function BlogAuthor({ id }: { id: string }) { string, ][]; + const dynamicPath = `/author/${id}`; + const authorUrl = localizedDynamicUrl('blog', locale, dynamicPath); + const alternates = hreflangAlternatesDynamic('blog', dynamicPath); + return (- {post.title} + {post.title}
{post.excerpt && (@@ -414,6 +443,7 @@ function BlogAuthor({ id }: { id: string }) { function RelatedPosts({ slug }: { slug: string }) { const related = getRelatedPosts(slug, 3); + const lp = useLocalizedPath(); if (related.length === 0) return null; @@ -424,7 +454,7 @@ function RelatedPosts({ slug }: { slug: string }) { {related.map((post) => (
Tag Not Found
No posts were found for this tag.
- + ← Back to Blog- {posts.length} {posts.length === 1 ? 'post' : 'posts'} tagged “{tag}”.{' '} + {posts.length} {posts.length === 1 ? 'post' : 'posts'} tagged "{tag}".{' '}
- {post.title} + {post.title}
{post.excerpt && (
diff --git a/src/pages/CaseStudies.tsx b/src/pages/CaseStudies.tsx
index 25caa04..a943265 100644
--- a/src/pages/CaseStudies.tsx
+++ b/src/pages/CaseStudies.tsx
@@ -1,9 +1,13 @@
import { useState } from 'react';
+import { Helmet } from 'react-helmet-async';
import { Link, useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { entries } from '../data/case-studies.json';
import Layout from '../components/Layout';
import { article, breadcrumbList, serializeJsonLd, SITE_URL } from '../utils/jsonld';
+import { usePageSeo } from '../utils/seo';
+import { useLocalizedPath } from '../hooks/useLocalePath';
+import { localizedDynamicUrl, hreflangAlternatesDynamic } from '../utils/seo';
type CaseStudy = {
id: string;
@@ -36,13 +40,17 @@ type CaseStudy = {
function CaseStudyDetail({ study }: { study: CaseStudy }) {
const { t } = useTranslation();
+ const lp = useLocalizedPath();
+ const { i18n: i18nInstance } = useTranslation();
+ const locale = (i18nInstance.language?.split('-')[0] ?? 'en') as 'en' | 'es' | 'pt';
const formattedDate = new Intl.DateTimeFormat('en-US', {
month: 'long',
year: 'numeric',
}).format(new Date(study.integrationDate));
// Schema.org structured data for SEO
- const studyUrl = `${SITE_URL}/case-studies/${study.slug}`;
+ const dynamicPath = `/${study.slug}`;
+ const studyUrl = localizedDynamicUrl('caseStudies', locale, dynamicPath);
const structuredData = article({
headline: `${study.org} - ${study.useCase}`,
description: study.summary,
@@ -52,9 +60,10 @@ function CaseStudyDetail({ study }: { study: CaseStudy }) {
});
const breadcrumbs = breadcrumbList([
{ name: 'Home', url: SITE_URL },
- { name: 'Case Studies', url: `${SITE_URL}/case-studies` },
+ { name: 'Case Studies', url: localizedDynamicUrl('caseStudies', locale, '') },
{ name: study.org, url: studyUrl },
]);
+ const alternates = hreflangAlternatesDynamic('caseStudies', dynamicPath);
return (