Skip to content

Commit

Permalink
Include trailing slashes on all links
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3 committed Jul 3, 2024
1 parent f23d7f8 commit 079650d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/components/NavBar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ if (currentPath[currentPath.length - 1] === "/") {
loading="eager"
/>
<a class={currentPath === "" ? "active" : ""} href="/">Home</a>
<a class={currentPath === "as211224" ? "active" : ""} href="/as211224"
<a class={currentPath === "as211224" ? "active" : ""} href="/as211224/"
>AS211224</a
>
<a class={currentPath === "posts" ? "active" : ""} href="/posts">Posts</a>
<a class={currentPath === "posts" ? "active" : ""} href="/posts/">Posts</a>
</nav>

<style>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProjectCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const randomColor = () => {
const color = randomColor();
---

<a class="projectLink" href={`/projects/${project.slug}`}>
<a class="projectLink" href={`/projects/${project.slug}/`}>
<div class="innerCard">
<h2>{project.data.title}</h2>
<p>{project.data.description}</p>
Expand Down
2 changes: 1 addition & 1 deletion src/content/projects/as211224.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: AS211224
date: 2021 to Present
link: https://jb3.dev/as211224
link: https://jb3.dev/as211224/
description: AS211224 is a small IPv6-only hobbyist network.
---
AS211224 is a small IPv6-only hobbyist network.
Expand Down
8 changes: 4 additions & 4 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const latestPosts = posts
</p>

<p>
I am also the administrator of the hobbyist <a href="/as211224"
I am also the administrator of the hobbyist <a href="/as211224/"
>AS211224</a
> network, a small, IPv6-only network that I use to experiment with BGP and
other networking technologies.
Expand Down Expand Up @@ -89,16 +89,16 @@ const latestPosts = posts
latestPosts.map((post) => (
<li>
<span>
<a href={`/posts/${post.slug}`}>{post.data.title}</a>{" "}
<a href={`/posts/${post.slug}/`}>{post.data.title}</a>{" "}
<span class="post-rest">{post.data.date}</span>
</span>
</li>
))
}

<li>
<br/>
<a href="/posts">View all posts</a>
<br />
<a href="/posts/">View all posts</a>
</li>
</ul>

Expand Down
20 changes: 13 additions & 7 deletions src/pages/posts.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ const posts = (await getCollection("blog")) as CollectionEntry<"blog">[];
---

<Layout title="Posts" description="A collection of posts">
<p>Here you can find a collection of posts on various topics that I find
interesting. A lot of these are just me trying to figure out how to do
things, so they might not be the most polished pieces of writing, but I hope
you find them useful.</p>

<p>An RSS feed is available at <a href="/feed.xml"><code>/feed.xml</code></a>.</p>
<p>
Here you can find a collection of posts on various topics that I find
interesting. A lot of these are just me trying to figure out how to do
things, so they might not be the most polished pieces of writing, but I
hope you find them useful.
</p>

<p>
An RSS feed is available at <a href="/feed.xml"
><code>/feed.xml</code></a
>.
</p>

<ul>
{
Expand All @@ -24,7 +30,7 @@ const posts = (await getCollection("blog")) as CollectionEntry<"blog">[];
{post.data.tags.join(", ")}
</span>
<p>{post.data.blurb}</p>
<a href={`/posts/${post.slug}`}>Read more</a>
<a href={`/posts/${post.slug}/`}>Read more</a>
</li>
))
}
Expand Down

0 comments on commit 079650d

Please sign in to comment.