feat(seo): expand sitemap and structured data
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { AboutContent } from "@/components/about-content";
|
||||
import { PersonJsonLd } from "@/components/json-ld";
|
||||
import { getStaticPageMetadata } from "@/lib/seo";
|
||||
import { ProfilePageJsonLd } from "@/components/json-ld";
|
||||
import { getLocalizedUrl, getStaticPageMetadata } from "@/lib/seo";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
@@ -11,10 +12,25 @@ export async function generateMetadata({
|
||||
return getStaticPageMetadata({ locale, page: "about", path: "/about" });
|
||||
}
|
||||
|
||||
export default function AboutPage() {
|
||||
export default async function AboutPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>;
|
||||
}) {
|
||||
const { locale } = await params;
|
||||
const siteLocale = locale === "en" ? "en" : "tr";
|
||||
const t = await getTranslations({
|
||||
locale: siteLocale,
|
||||
namespace: "Seo.about",
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<PersonJsonLd
|
||||
<ProfilePageJsonLd
|
||||
pageUrl={getLocalizedUrl(siteLocale, "/about")}
|
||||
pageName={t("title")}
|
||||
description={t("description")}
|
||||
locale={siteLocale}
|
||||
name="Poyraz Avsever"
|
||||
jobTitle="Fullstack Developer"
|
||||
sameAs={[
|
||||
|
||||
@@ -90,6 +90,7 @@ export default async function AgendaDetailPage({ params }: AgendaDetailPageProps
|
||||
image={post.coverImage}
|
||||
datePublished={post.date}
|
||||
authorName={post.author}
|
||||
locale={locale as SiteLocale}
|
||||
/>
|
||||
<BlogDetailContent post={post} section="agenda" />
|
||||
</>
|
||||
|
||||
@@ -109,6 +109,7 @@ export default async function AnimationSourceDetailPage({
|
||||
image={source.coverImage}
|
||||
datePublished={source.date}
|
||||
authorName={source.author}
|
||||
locale={locale === "en" ? "en" : "tr"}
|
||||
/>
|
||||
<AnimationSourceDetailContent source={source} />
|
||||
</>
|
||||
|
||||
@@ -90,6 +90,7 @@ export default async function BlogDetailPage({ params }: BlogDetailPageProps) {
|
||||
image={post.coverImage}
|
||||
datePublished={post.date}
|
||||
authorName={post.author}
|
||||
locale={locale as SiteLocale}
|
||||
/>
|
||||
<BlogDetailContent post={post} />
|
||||
</>
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
import { ProjectsContent } from "@/components/projects-content";
|
||||
import { getStaticPageMetadata } from "@/lib/seo";
|
||||
import { ProjectsJsonLd } from "@/components/json-ld";
|
||||
import {
|
||||
EXTENSIONS,
|
||||
FIGMA_TEMPLATES,
|
||||
MOBILE_APPS,
|
||||
WEB_APPS,
|
||||
} from "@/data/projects";
|
||||
import { getLocalizedValue } from "@/lib/locale";
|
||||
import { getLocalizedUrl, getStaticPageMetadata } from "@/lib/seo";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
@@ -14,6 +23,40 @@ export async function generateMetadata({
|
||||
});
|
||||
}
|
||||
|
||||
export default function ProjectsPage() {
|
||||
return <ProjectsContent />;
|
||||
export default async function ProjectsPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>;
|
||||
}) {
|
||||
const { locale } = await params;
|
||||
const siteLocale = locale === "en" ? "en" : "tr";
|
||||
const t = await getTranslations({
|
||||
locale: siteLocale,
|
||||
namespace: "Seo.projects",
|
||||
});
|
||||
const projects = [
|
||||
...WEB_APPS,
|
||||
...MOBILE_APPS,
|
||||
...EXTENSIONS,
|
||||
...FIGMA_TEMPLATES,
|
||||
].map((project) => ({
|
||||
name: getLocalizedValue(project.title, siteLocale),
|
||||
description: getLocalizedValue(project.description, siteLocale),
|
||||
image: project.image,
|
||||
url: project.href,
|
||||
technologies: project.technologies,
|
||||
}));
|
||||
|
||||
return (
|
||||
<>
|
||||
<ProjectsJsonLd
|
||||
name={t("title")}
|
||||
description={t("description")}
|
||||
url={getLocalizedUrl(siteLocale, "/projects")}
|
||||
locale={siteLocale}
|
||||
projects={projects}
|
||||
/>
|
||||
<ProjectsContent />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user