Skip to content

Commit fca8cc4

Browse files
committed
Fix: Add site config for Astro.site
1 parent 118bdd0 commit fca8cc4

7 files changed

Lines changed: 18 additions & 35 deletions

File tree

astro.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ import { defineConfig } from 'astro/config';
22

33
export default defineConfig({
44
output: 'static',
5-
base: '/', // root — because it's an org/user GitHub Pages site
5+
base: '/', // correct for your case
6+
site: 'https://malapa-collab.github.io/', // <-- this is key
67
});

src/components/Navbar.astro

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
---
2+
const base = Astro.site?.pathname || '/';
3+
---
4+
15
<nav class="flex gap-6 p-4 border-b border-gray-300 text-sm">
2-
<a href="/" class="hover:underline">Home</a>
3-
<a href="/mission" class="hover:underline">Mission</a>
4-
<a href="/workshops" class="hover:underline">Workshops</a>
5-
<a href="/publications" class="hover:underline">Publications</a>
6-
<a href="/contact" class="hover:underline">Contact</a>
7-
</nav>
6+
<a href="{base}" class="hover:underline">Home</a>
7+
<a href="{base}mission/" class="hover:underline">Mission</a>
8+
<a href="{base}workshops/" class="hover:underline">Workshops</a>
9+
<a href="{base}publications/" class="hover:underline">Publications</a>
10+
<a href="{base}contact/" class="hover:underline">Contact</a>
11+
</nav>

src/layouts/BaseLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ const { title } = Astro.props;
1515
<slot />
1616
</main>
1717
</body>
18-
</html>
18+
</html>

src/layouts/Layout.astro

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/pages/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import BaseLayout from '../layouts/BaseLayout.astro';
33
---
44

55
<BaseLayout title="Home">
6-
<h1 class="text-3xl font-bold mb-4">Welcome to Our Collaboration</h1>
6+
<h1 class="text-3xl font-bold mb-4">Welcome to MALAPA Collaboration</h1>
77
<p>This is an international academic collaboration focused on ...</p>
8-
</BaseLayout>
8+
</BaseLayout>

src/pages/publications.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import BaseLayout from '../layouts/BaseLayout.astro';
55
<BaseLayout title="Publications">
66
<h1 class="text-2xl font-bold mb-4">Publications</h1>
77
<ul class="list-disc ml-6">
8-
<li>Author1, Author2. *Title*. Journal, Year.</li>
9-
<li>Author1, Author2. *Title*. Journal, Year.</li>
8+
<li>Author1, Author2. <em>Title</em>. Journal, Year.</li>
9+
<li>Author1, Author2. <em>Title</em>. Journal, Year.</li>
1010
</ul>
1111
</BaseLayout>

src/pages/workshops.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ import BaseLayout from '../layouts/BaseLayout.astro';
77
<ul class="list-disc ml-6">
88
<li>Workshop 1 — Month, Year — Location</li>
99
<li>Workshop 2 — Month, Year — Location</li>
10-
<li>Workshop 5April, 2025CERN, Geneva</li>
10+
<li>Workshop 3Month, YearLocation</li>
1111
</ul>
1212
</BaseLayout>

0 commit comments

Comments
 (0)