Skip to content

Commit bf4b721

Browse files
committed
Improve Astro Pages workflow and SEO metadata
1 parent a0fa40c commit bf4b721

3 files changed

Lines changed: 23 additions & 5 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ jobs:
2828
- name: Checkout
2929
uses: actions/checkout@v4
3030

31-
- name: Setup Pages
32-
uses: actions/configure-pages@v4
33-
with:
34-
static_site_generator: astro
35-
3631
- name: Set base path for project pages
3732
shell: bash
3833
run: |

public/robots.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
User-agent: *
2+
Allow: /
3+
4+
Sitemap: https://rekylee.github.io/sitemap-index.xml

src/layouts/BaseLayout.astro

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ const canonicalUrl = new URL(Astro.url.pathname, Astro.site);
1414
const enUrl = getAbsoluteLocaleUrl("en");
1515
const heUrl = getAbsoluteLocaleUrl("he");
1616
const ogLocale = locale === "he" ? "he_IL" : "en_US";
17+
const ogImageUrl = new URL("/PickMi.png", Astro.site);
18+
const personName = locale === "he" ? "קיילי בניסטי" : "Kylee Benisty";
19+
const personJsonLd = {
20+
"@context": "https://schema.org",
21+
"@type": "Person",
22+
name: personName,
23+
url: new URL("/", Astro.site).toString(),
24+
image: ogImageUrl.toString(),
25+
jobTitle:
26+
locale === "he"
27+
? "מפתחת משחקים ומהנדסת תוכנה"
28+
: "Game Developer and Software Engineer",
29+
};
1730
---
1831

1932
<!doctype html>
@@ -22,6 +35,7 @@ const ogLocale = locale === "he" ? "he_IL" : "en_US";
2235
<meta charset="utf-8" />
2336
<meta name="viewport" content="width=device-width, initial-scale=1" />
2437
<meta name="description" content={description} />
38+
<meta name="robots" content="index, follow, max-image-preview:large" />
2539
<title>{title}</title>
2640

2741
<link rel="icon" href="/favicon.svg" />
@@ -35,9 +49,14 @@ const ogLocale = locale === "he" ? "he_IL" : "en_US";
3549
<meta property="og:description" content={description} />
3650
<meta property="og:url" content={canonicalUrl} />
3751
<meta property="og:locale" content={ogLocale} />
52+
<meta property="og:image" content={ogImageUrl} />
53+
<meta property="og:image:alt" content={title} />
3854
<meta name="twitter:card" content="summary_large_image" />
3955
<meta name="twitter:title" content={title} />
4056
<meta name="twitter:description" content={description} />
57+
<meta name="twitter:image" content={ogImageUrl} />
58+
<meta name="twitter:image:alt" content={title} />
59+
<script type="application/ld+json" set:html={JSON.stringify(personJsonLd)} />
4160

4261
<link rel="preconnect" href="https://fonts.googleapis.com" />
4362
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />

0 commit comments

Comments
 (0)