Skip to content

Commit f48e448

Browse files
committed
Fix trailing slash in base URL and all path references
1 parent 2e0e584 commit f48e448

File tree

9 files changed

+24
-32
lines changed

9 files changed

+24
-32
lines changed

project/astro.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ import { defineConfig } from 'astro/config';
55
export default defineConfig({
66

77
site: 'https://Silv3rP.github.io',
8-
base: '/project',
8+
base: '/project/',
99
});

project/src/components/banner.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
44
---
55

6-
<img src={`${import.meta.env.BASE_URL}/images/logo.png`} alt="Banner Image"/>
6+
<img src={`${import.meta.env.BASE_URL}images/logo.png`} alt="Banner Image"/>

project/src/components/footer.astro

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
33
---
44
<footer>
5-
<a href={`${import.meta.env.BASE_URL}/`}>Home</a>
6-
7-
<a href={`${import.meta.env.BASE_URL}/about`}>About</a>
8-
9-
<a href={`${import.meta.env.BASE_URL}/gallery`}>Gallery</a>
10-
11-
<a href={`${import.meta.env.BASE_URL}/contact`}>Contact</a>
5+
<a href={`${import.meta.env.BASE_URL}`}>Home</a>
6+
7+
<a href={`${import.meta.env.BASE_URL}about`}>About</a>
8+
9+
<a href={`${import.meta.env.BASE_URL}gallery`}>Gallery</a>
10+
11+
<a href={`${import.meta.env.BASE_URL}contact`}>Contact</a>
1212
<p>&copy; 2025 Saykan Combat. All rights reserved.</p>
1313
<p>Designed by C</p>
1414
<strong><a href="mailto:example@example.com">Contact Designer</a></strong>

project/src/components/header.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
<header>
88
<picture class="logo">
9-
<source srcset={`${import.meta.env.BASE_URL}/images/logo.png`} media="(max-width: 400px)" />
10-
<img src={`${import.meta.env.BASE_URL}/images/logo.png`} alt="Banner Image" style="width: 25%; height: auto;" />
9+
<source srcset={`${import.meta.env.BASE_URL}images/logo.png`} media="(max-width: 400px)" />
10+
<img src={`${import.meta.env.BASE_URL}images/logo.png`} alt="Banner Image" style="width: 25%; height: auto;" />
1111
</picture>
1212
<h1>SAYKAN COMBAT</h1>
1313
<br>

project/src/components/nav.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
---
55

66
<nav>
7-
<a href={`${import.meta.env.BASE_URL}/`}>Home</a>
8-
<a href={`${import.meta.env.BASE_URL}/about`}>About</a>
9-
<a href={`${import.meta.env.BASE_URL}/gallery`}>Gallery</a>
10-
<a href={`${import.meta.env.BASE_URL}/contact`}>Contact</a>
7+
<a href={`${import.meta.env.BASE_URL}`}>Home</a>
8+
<a href={`${import.meta.env.BASE_URL}about`}>About</a>
9+
<a href={`${import.meta.env.BASE_URL}gallery`}>Gallery</a>
10+
<a href={`${import.meta.env.BASE_URL}contact`}>Contact</a>
1111
</nav>

project/src/layouts/Layout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const baseURL = import.meta.env.BASE_URL;
1414
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1515
<title>Saykan Combat</title>
1616
<base href={baseURL} />
17-
<link rel="stylesheet" href={`${import.meta.env.BASE_URL}/css/styles.css`} />
17+
<link rel="stylesheet" href={`${import.meta.env.BASE_URL}css/styles.css`} />
1818
</head>
1919
<body>
2020
<Header />

project/src/pages/contact.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import Layout from '../layouts/Layout.astro';
3131

3232
<textarea id="message" name="message" rows="4" required></textarea><br><br>
3333

34-
<strong><a href="./contact2"><button type="button" class="submit-button">Submit</button></a></strong>
34+
<strong><a href={`${import.meta.env.BASE_URL}contact2`}><button type="button" class="submit-button">Submit</button></a></strong>
3535

3636
</form>
3737

project/src/pages/gallery.astro

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@ import Layout from '../layouts/Layout.astro';
88
<h1>Gallery</h1>
99

1010
<br>
11-
<picture class="gallery-images">
12-
<source srcset={`${import.meta.env.BASE_URL}/images/img1.png`} media="(max-width: 400px)" />
13-
<img src={`${import.meta.env.BASE_URL}/images/img1.png`} alt="Image 1" style="width: 50%; height: auto;" />
14-
15-
<source srcset={`${import.meta.env.BASE_URL}/images/escrima.jpg`} media="(max-width: 400px)" />
16-
<img src={`${import.meta.env.BASE_URL}/images/escrima.jpg`} alt="Image 2" style="width: 50%; height: auto;" />
17-
18-
<source srcset={`${import.meta.env.BASE_URL}/images/img2.jpg`} media="(max-width: 400px)" />
19-
<img src={`${import.meta.env.BASE_URL}/images/img2.jpg`} alt="Image 3" style="width: 50%; height: auto;" />
20-
21-
<source srcset={`${import.meta.env.BASE_URL}/images/img3.jpg`} media="(max-width: 400px)" />
22-
<img src={`${import.meta.env.BASE_URL}/images/img3.jpg`} alt="Image 4" style="width: 50%; height: auto;" />
23-
24-
</picture>
11+
<div class="gallery-images">
12+
<img src={`${import.meta.env.BASE_URL}images/img1.png`} alt="Image 1" style="width: 50%; height: auto;" />
13+
<img src={`${import.meta.env.BASE_URL}images/escrima.jpg`} alt="Image 2" style="width: 50%; height: auto;" />
14+
<img src={`${import.meta.env.BASE_URL}images/img2.jpg`} alt="Image 3" style="width: 50%; height: auto;" />
15+
<img src={`${import.meta.env.BASE_URL}images/img3.jpg`} alt="Image 4" style="width: 50%; height: auto;" />
16+
</div>
2517

2618
</Layout>

project/src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ import Layout from '../layouts/Layout.astro';
2020
<li>Join a supportive community of martial artists</li>
2121
</ol>
2222

23-
<p>Want to submit a request? <a href="./contact">Contact us here</a></p>
23+
<p>Want to submit a request? <a href={`${import.meta.env.BASE_URL}contact`}>Contact us here</a></p>
2424
</Layout>

0 commit comments

Comments
 (0)