Skip to content

Commit fac5e33

Browse files
committed
Basic SEO changes.
1 parent 3eb27a4 commit fac5e33

10 files changed

Lines changed: 109 additions & 21 deletions

File tree

astro.config.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { defineConfig } from 'astro/config';
44
import tailwindcss from '@tailwindcss/vite';
55
import react from '@astrojs/react';
66

7+
import sitemap from '@astrojs/sitemap';
8+
79
// https://astro.build/config
810
export default defineConfig({
911
site: 'https://utrechtuniversity.github.io',
@@ -20,5 +22,5 @@ export default defineConfig({
2022
}
2123
},
2224

23-
integrations: [react()]
24-
});
25+
integrations: [react(), sitemap()]
26+
});

package-lock.json

Lines changed: 58 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"dependencies": {
3838
"@astrojs/check": "^0.9.6",
3939
"@astrojs/react": "^4.4.2",
40+
"@astrojs/sitemap": "^3.7.0",
4041
"@resvg/resvg-js": "^2.6.2",
4142
"@tailwindcss/vite": "^4.1.17",
4243
"@types/react": "^19.2.7",

public/robots.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
User-agent: *
2+
Allow: /
3+
4+
# Work in Progress Pages
5+
Disallow: /news
6+
Disallow: /news/*
7+
Disallow: /achievements
8+
Disallow: /activities
9+
Disallow: /activities/*
10+
Disallow: /search
11+
Disallow: /success-stories
12+
Disallow: /research
13+
Disallow: /research/*
14+
Disallow: /books/*
15+
Disallow: /softwares/*
16+
17+
# Technical / Search Assets
18+
Disallow: /search-index.json
19+
Disallow: /_pagefind/
20+
Disallow: /404
21+
22+
Sitemap: https://utrechtuniversity.github.io/ecobuild/sitemap-index.xml

src/components/Header.astro

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const getIcon = (key: string) => iconMap[key] || Sparkles;
4747
<img
4848
src={`/ecobuild${SITE.logo}`}
4949
alt="Logo"
50-
class="h-8 w-8 object-contain"
50+
class="h-8 md:h-10 w-auto object-contain"
5151
/>
5252
)
5353
}
@@ -176,7 +176,11 @@ const getIcon = (key: string) => iconMap[key] || Sparkles;
176176
<div class="flex items-center gap-3">
177177
{
178178
LOGO_IMAGE.enable && SITE.logo && (
179-
<img src={SITE.logo} alt="Logo" class="h-10 w-10 object-contain" />
179+
<img
180+
src={`/ecobuild${SITE.logo}`}
181+
alt="Logo"
182+
class="h-10 w-auto object-contain"
183+
/>
180184
)
181185
}
182186
<span class="font-bold text-gray-900 text-xl">{SITE.labName}</span>

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import heroImage from './assets/hero-real.jpg';
33
export const SITE = {
44
website: 'https://utrechtuniversity.github.io/ecobuild',
55
author: 'Stefan Leon',
6-
description: 'EcoBUILD - the largest evidence-based, open-access and open-source information platform focusing on ecological benefits of design strategies.',
6+
description: 'The largest evidence-based, open-access and open-source information platform focusing on ecological benefits of design strategies.',
77
title: 'EcoBUILD',
88
//ogImage: 'astropaper-og.jpg', // No idea what this does
99
lightAndDarkMode: true,

src/layouts/Layout.astro

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ const ogImage = new URL(
5656
href={`${import.meta.env.BASE_URL}/assets/Utrecht_University_logo.png`}
5757
/>
5858
<meta name="generator" content={Astro.generator} />
59+
<link rel="canonical" href={Astro.url.href} />
60+
<link
61+
rel="sitemap"
62+
href={`${import.meta.env.BASE_URL}/sitemap-index.xml`}
63+
/>
5964

6065
<title>{pageTitle}</title>
6166

src/pages/about.astro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import Layout from "../layouts/Layout.astro";
33
import { SITE } from "../config";
44
---
55

6-
<Layout title="About">
6+
<Layout
7+
title="About"
8+
description="Learn about the EcoBuild project, our mission to bridge building design with ecosystem services, and our science-driven platform."
9+
>
710
<section class="max-w-4xl mx-auto px-4 py-12">
811
<h1 class="text-4xl font-bold mb-6">About This Project</h1>
912

src/pages/publications.astro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ const sections = [
7878
];
7979
---
8080

81-
<Layout title="Publications">
81+
<Layout
82+
title="Publications"
83+
description="A comprehensive collection of academic papers, newspaper articles, and presentations by the EcoBuild research team."
84+
>
8285
<div class="max-w-7xl mx-auto px-4 py-12 sm:py-20">
8386
<div class="max-w-3xl mx-auto text-center mb-16">
8487
<h1 class="text-4xl font-bold text-gray-900 mb-4">Publications</h1>

src/pages/team.astro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ const groupedMembers = groups.reduce(
110110
);
111111
---
112112

113-
<Layout title="Team">
113+
<Layout
114+
title="Team"
115+
description="Meet the researchers and students behind EcoBuild, focusing on sustainable and regenerative building design at Utrecht University."
116+
>
114117
<div class="max-w-7xl mx-auto px-4 py-12 sm:py-20">
115118
<div class="max-w-3xl mx-auto text-center mb-16">
116119
<h1

0 commit comments

Comments
 (0)