Skip to content

Commit 1fefee4

Browse files
committed
update meta tags, robots.txt to improve seo
1 parent f537757 commit 1fefee4

File tree

8 files changed

+166
-25
lines changed

8 files changed

+166
-25
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "first-website",
2+
"name": "firstcontributions webapp",
33
"type": "module",
44
"version": "0.0.1",
55
"scripts": {

public/manifest.json

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
{
2-
"short_name": "First Contributions",
3-
"name": "First Contributions",
4-
"icons": [
5-
{
6-
"src": "android-chrome-192x192.png",
7-
"sizes": "192x192",
8-
"type": "image/png"
9-
},
10-
{
11-
"src": "android-chrome-256x256.png",
12-
"sizes": "256x256",
13-
"type": "image/png"
14-
}
15-
],
16-
"theme_color": "#ffffff",
17-
"background_color": "#ffffff",
18-
"display": "standalone",
19-
"start_url": "index.html"
2+
"short_name": "First Contributions",
3+
"name": "First Contributions - Make Your First Open Source Contribution",
4+
"description": "Learn how to make your first open source contribution in just 5 minutes. Step-by-step guide for beginners with beginner-friendly projects and resources.",
5+
"icons": [
6+
{
7+
"src": "android-chrome-192x192.png",
8+
"sizes": "192x192",
9+
"type": "image/png",
10+
"purpose": "any maskable"
11+
},
12+
{
13+
"src": "android-chrome-256x256.png",
14+
"sizes": "256x256",
15+
"type": "image/png",
16+
"purpose": "any maskable"
17+
}
18+
],
19+
"theme_color": "#667eea",
20+
"background_color": "#0a0a0a",
21+
"display": "standalone",
22+
"start_url": "/",
23+
"scope": "/",
24+
"orientation": "portrait-primary",
25+
"categories": ["education", "developer", "programming"],
26+
"lang": "en"
2027
}

public/og-image.svg

Lines changed: 41 additions & 0 deletions
Loading

public/robots.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
User-agent: *
2+
Allow: /
3+
4+
# Sitemap
5+
Sitemap: https://firstcontributions.github.io/sitemap.xml
6+
7+
# Crawl-delay
8+
Crawl-delay: 1

public/sitemap.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3+
<url>
4+
<loc>https://firstcontributions.github.io/</loc>
5+
<lastmod>2025-01-27</lastmod>
6+
<changefreq>weekly</changefreq>
7+
<priority>1.0</priority>
8+
</url>
9+
<url>
10+
<loc>https://firstcontributions.github.io/contribute-to-opensource</loc>
11+
<lastmod>2025-01-27</lastmod>
12+
<changefreq>monthly</changefreq>
13+
<priority>0.8</priority>
14+
</url>
15+
</urlset>

src/components/App.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import SocialShare from './SocialShare.astro';
4545
font-size: 5.1rem;
4646
letter-spacing: -0.05em;
4747
font-weight: 700;
48-
margin: 0;
48+
margin: 0 0 20px 0;
4949
line-height: 1.2;
5050
}
5151

src/layouts/Layout.astro

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@
22
export interface Props {
33
title?: string;
44
description?: string;
5+
keywords?: string;
6+
image?: string;
7+
url?: string;
8+
type?: string;
59
}
610
7-
const { title = "First Contributions", description = "Make your first open source contribution in 5 minutes" } = Astro.props;
11+
const {
12+
title = "First Contributions - Make Your First Open Source Contribution in 5 Minutes",
13+
description = "Learn how to make your first open source contribution in just 5 minutes. Step-by-step guide for beginners with beginner-friendly projects and resources.",
14+
keywords = "open source, github, contribute to open source, beginner programmer, first contribution, git, pull request, coding, software development, programming, learn to code",
15+
image = "https://firstcontributions.github.io/og-image.svg",
16+
url = "https://firstcontributions.github.io/",
17+
type = "website"
18+
} = Astro.props;
819
---
920

1021
<!doctype html>
@@ -26,21 +37,74 @@ const { title = "First Contributions", description = "Make your first open sourc
2637
<meta name="msapplication-TileImage" content="/mstile-150x150.png" />
2738
<meta name="theme-color" content="#667eea" />
2839

40+
<!-- Web App Manifest -->
41+
<link rel="manifest" href="/manifest.json" />
42+
2943
<meta name="generator" content={Astro.generator} />
3044
<meta name="description" content={description} />
45+
<meta name="keywords" content={keywords} />
46+
<meta name="author" content="First Contributions" />
47+
<meta name="robots" content="index, follow" />
3148
<title>{title}</title>
3249

50+
<!-- Canonical URL -->
51+
<link rel="canonical" href={url} />
52+
3353
<!-- Open Graph / Facebook -->
34-
<meta property="og:type" content="website" />
35-
<meta property="og:url" content="https://firstcontributions.github.io/" />
54+
<meta property="og:type" content={type} />
55+
<meta property="og:url" content={url} />
3656
<meta property="og:title" content={title} />
3757
<meta property="og:description" content={description} />
58+
<meta property="og:image" content={image} />
59+
<meta property="og:image:width" content="1200" />
60+
<meta property="og:image:height" content="630" />
61+
<meta property="og:site_name" content="First Contributions" />
3862

3963
<!-- Twitter -->
4064
<meta property="twitter:card" content="summary_large_image" />
41-
<meta property="twitter:url" content="https://firstcontributions.github.io/" />
65+
<meta property="twitter:url" content={url} />
4266
<meta property="twitter:title" content={title} />
4367
<meta property="twitter:description" content={description} />
68+
<meta property="twitter:image" content={image} />
69+
<meta property="twitter:creator" content="@firstcontrib" />
70+
<meta property="twitter:site" content="@firstcontrib" />
71+
72+
<!-- Structured Data / Schema.org -->
73+
<script type="application/ld+json">
74+
{
75+
"@context": "https://schema.org",
76+
"@type": "WebSite",
77+
"name": "First Contributions",
78+
"description": "Learn how to make your first open source contribution in just 5 minutes. Step-by-step guide for beginners with beginner-friendly projects and resources.",
79+
"url": "https://firstcontributions.github.io/",
80+
"potentialAction": {
81+
"@type": "SearchAction",
82+
"target": "https://firstcontributions.github.io/?q={search_term_string}",
83+
"query-input": "required name=search_term_string"
84+
},
85+
"publisher": {
86+
"@type": "Organization",
87+
"name": "First Contributions",
88+
"url": "https://firstcontributions.github.io/",
89+
"logo": {
90+
"@type": "ImageObject",
91+
"url": "https://firstcontributions.github.io/favicon.svg"
92+
}
93+
},
94+
"mainEntity": {
95+
"@type": "EducationalResource",
96+
"name": "How to Make Your First Open Source Contribution",
97+
"description": "A comprehensive guide for beginners to start contributing to open source projects",
98+
"educationalLevel": "beginner",
99+
"learningResourceType": "tutorial",
100+
"teaches": ["Git", "GitHub", "Open Source", "Programming", "Software Development"],
101+
"audience": {
102+
"@type": "EducationalAudience",
103+
"educationalRole": "student"
104+
}
105+
}
106+
}
107+
</script>
44108
</head>
45109
<body>
46110
<slot />

src/pages/index.astro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ import Layout from '../layouts/Layout.astro';
33
import App from '../components/App.astro';
44
---
55

6-
<Layout title="First Contributions - Make your first open source contribution in 5 minutes">
6+
<Layout
7+
title="First Contributions - Make Your First Open Source Contribution in 5 Minutes"
8+
description="Learn how to make your first open source contribution in just 5 minutes. Step-by-step guide for beginners with beginner-friendly projects and resources."
9+
keywords="open source, github, contribute to open source, beginner programmer, first contribution, git, pull request, coding, software development, programming, learn to code"
10+
url="https://firstcontributions.github.io/"
11+
type="website"
12+
>
713
<App />
814
</Layout>

0 commit comments

Comments
 (0)