Skip to content

Commit 78e2253

Browse files
authored
Merge pull request #8 from modeitsch/seo-improvements
feat: Add SEO improvements with Open Graph, Twitter Cards, and JSON-LD
2 parents 1b17b37 + b54c3d0 commit 78e2253

2 files changed

Lines changed: 84 additions & 0 deletions

File tree

src/lib/components/SEO.svelte

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<script>
2+
export let title = "Moshe Deitsch - Developer & Guitarist";
3+
export let description = "Full-stack developer passionate about creating beautiful, modern web experiences with cutting-edge technologies. Coding for breakfast, coding for lunch... playing guitar for brunch.";
4+
export let url = "https://modeitsch.github.io";
5+
export let image = "https://avatars.githubusercontent.com/u/41856538?v=4";
6+
export let type = "website";
7+
8+
// Structured data for Person (JSON-LD)
9+
const personSchema = {
10+
"@context": "https://schema.org",
11+
"@type": "Person",
12+
"name": "Moshe Deitsch",
13+
"url": url,
14+
"image": image,
15+
"jobTitle": "Full Stack Developer",
16+
"description": description,
17+
"sameAs": [
18+
"https://github.com/modeitsch",
19+
"https://linkedin.com/in/moshe-deitsch",
20+
"https://twitter.com/modeitsch"
21+
],
22+
"knowsAbout": [
23+
"JavaScript",
24+
"TypeScript",
25+
"React",
26+
"Svelte",
27+
"Node.js",
28+
"Web Development",
29+
"Full Stack Development"
30+
]
31+
};
32+
33+
// Structured data for Website (JSON-LD)
34+
const websiteSchema = {
35+
"@context": "https://schema.org",
36+
"@type": "WebSite",
37+
"name": "Moshe Deitsch Portfolio",
38+
"url": url,
39+
"description": description,
40+
"author": {
41+
"@type": "Person",
42+
"name": "Moshe Deitsch"
43+
}
44+
};
45+
</script>
46+
47+
<svelte:head>
48+
<!-- Primary Meta Tags -->
49+
<meta name="title" content={title} />
50+
<meta name="description" content={description} />
51+
<meta name="author" content="Moshe Deitsch" />
52+
<meta name="robots" content="index, follow" />
53+
<link rel="canonical" href={url} />
54+
55+
<!-- Open Graph / Facebook -->
56+
<meta property="og:type" content={type} />
57+
<meta property="og:url" content={url} />
58+
<meta property="og:title" content={title} />
59+
<meta property="og:description" content={description} />
60+
<meta property="og:image" content={image} />
61+
<meta property="og:image:alt" content="Moshe Deitsch - Developer & Guitarist" />
62+
<meta property="og:site_name" content="Moshe Deitsch Portfolio" />
63+
<meta property="og:locale" content="en_US" />
64+
65+
<!-- Twitter -->
66+
<meta name="twitter:card" content="summary_large_image" />
67+
<meta name="twitter:url" content={url} />
68+
<meta name="twitter:title" content={title} />
69+
<meta name="twitter:description" content={description} />
70+
<meta name="twitter:image" content={image} />
71+
<meta name="twitter:creator" content="@modeitsch" />
72+
73+
<!-- Additional SEO -->
74+
<meta name="keywords" content="Moshe Deitsch, Full Stack Developer, Web Developer, JavaScript, TypeScript, React, Svelte, Node.js, Portfolio" />
75+
<meta name="geo.region" content="IL" />
76+
77+
<!-- Structured Data (JSON-LD) -->
78+
{@html `<script type="application/ld+json">${JSON.stringify(personSchema)}</script>`}
79+
{@html `<script type="application/ld+json">${JSON.stringify(websiteSchema)}</script>`}
80+
</svelte:head>

src/routes/+layout.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import KeyboardHints from '$lib/components/KeyboardHints.svelte';
66
import KonamiCode from '$lib/components/KonamiCode.svelte';
77
import CustomCursor from '$lib/components/CustomCursor.svelte';
8+
import SEO from '$lib/components/SEO.svelte';
89
import ScrollProgress from '$lib/components/ScrollProgress.svelte';
910
import ThreeBackground from '$lib/components/ThreeBackground.svelte';
1011
import ScrollAnimations from '$lib/components/ScrollAnimations.svelte';
@@ -39,6 +40,9 @@
3940
});
4041
</script>
4142

43+
<!-- SEO -->
44+
<SEO />
45+
4246
<!-- Global components -->
4347
<ScrollProgress />
4448
<ThreeBackground />

0 commit comments

Comments
 (0)