feat(seo): add keywords meta tag support for improved SEO
Deploy / verify (push) Successful in 37s
Deploy / deploy (push) Failing after 58s

- Introduced keywords property in layout and page server files to enhance SEO capabilities.
- Updated relevant components to include keywords in meta tags for better search engine visibility.
This commit is contained in:
Peter Meier
2026-04-18 12:28:13 +02:00
parent da294010c8
commit b08c64eb38
4 changed files with 7 additions and 0 deletions
+4
View File
@@ -20,6 +20,7 @@
seoDescription?: string;
socialImage?: string;
robots?: string;
keywords?: string;
jsonLd?: Record<string, unknown> | Record<string, unknown>[];
breadcrumbItems?: { href?: string; label: string }[];
topBanner?: {
@@ -185,6 +186,9 @@
{#if seoDescription}
<meta name="description" content={seoDescription} />
{/if}
{#if pageData?.keywords}
<meta name="keywords" content={pageData.keywords} />
{/if}
<link rel="canonical" href={canonical} />
<!-- Open Graph -->
<meta property="og:type" content="website" />
+1
View File
@@ -112,5 +112,6 @@ export const load: PageServerLoad = async ({ locals, fetch }) => {
: siteName,
seoDescription: page ? (page.seoDescription ?? page.subheadline ?? '') : '',
robots: (page as { seoMetaRobots?: string } | null)?.seoMetaRobots ?? undefined,
keywords: (page as { seoKeywords?: string } | null)?.seoKeywords ?? undefined,
};
};
+1
View File
@@ -79,6 +79,7 @@ export const load: PageServerLoad = async ({ params, locals, fetch }) => {
seoTitle: page.seoTitle ?? page.headline ?? page.linkName ?? slug,
seoDescription: page.seoDescription ?? page.subheadline ?? '',
robots: (page as { seoMetaRobots?: string }).seoMetaRobots ?? undefined,
keywords: (page as { seoKeywords?: string }).seoKeywords ?? undefined,
breadcrumbItems: [
{ href: '/', label: 'Start' },
{ label: page.headline ?? page.linkName ?? page.slug ?? page._slug ?? slug },
+1
View File
@@ -210,6 +210,7 @@ export const load: PageServerLoad = async ({ params, locals, url }) => {
seoDescription: postDescription,
socialImage: postSocialImageAbs ?? postImageUrl ?? undefined,
robots: (post as { seoMetaRobots?: string }).seoMetaRobots ?? undefined,
keywords: (post as { seoKeywords?: string }).seoKeywords ?? undefined,
jsonLd,
breadcrumbItems: [
{ href: '/', label: 'Start' },