Skip to content

Commit 2e373e1

Browse files
committed
Setup routing to work with Github Pages
1 parent d0716f4 commit 2e373e1

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

src/components/Navigation.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
---
33
<div class="nav-links">
4-
<a href="/">Home</a>
5-
<a href="/blog/">Blog</a>
4+
<a href="/Worldbuilding-Wiki">Home</a>
5+
<a href="/Worldbuilding-Wiki/blog/">Blog</a>
66
</div>

src/layouts/BaseLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ const { pageTitle } = Astro.props;
1414
<body>
1515
<Header />
1616
<h1>{pageTitle}</h1>
17-
<slot
17+
<slot />
1818
</body>
1919
</html>

src/layouts/MarkdownPostLayout.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
import '../styles/global.css';
3+
import Navigation from '../components/Navigation.astro';
34
45
const { frontmatter } = Astro.props;
56
---
67
<meta charset="utf-8" />
8+
<Navigation />
79
<h1>{frontmatter.title}</h1>
810
<p>Published on: {frontmatter.pubDate.toString().slice(0,10)}</p>
911
<p>Written by {frontmatter.author}</p>

src/pages/blog.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const pageTitle = "Blog";
1111
<p>I think this would be a good place to comment on different world building tidbits that I enjoy. I can muse on topics in a longer format or maybe even drop a book review here and there.</p>
1212

1313
<ul>
14-
<li><a href="/posts/tidbit-1/">Tidbit 1 - My First Blogpost</a></li>
14+
<li><a href="/Worldbuilding-Wiki/posts/tidbit-1/">Tidbit 1 - My First Blogpost</a></li>
1515
</ul>
1616
</body>
1717
</BaseLayout>

src/styles/global.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ html {
55

66
@font-face {
77
font-family: 'Spectral';
8-
src: url('/fonts/Spectral-Regular.ttf') format('truetype');
8+
src: url('/Worldbuilding-Wiki/fonts/Spectral-Regular.ttf') format('truetype');
99
font-weight: normal;
1010
font-style: normal;
1111
font-display: swap;
1212
}
1313

1414
@font-face {
1515
font-family: 'League Gothic Condensed';
16-
src: url('/fonts/Oswald-Bold.ttf') format('truetype');
16+
src: url('/Worldbuilding-Wiki/fonts/Oswald-Bold.ttf') format('truetype');
1717
font-weight: normal;
1818
font-style: normal;
1919
font-display: swap;

0 commit comments

Comments
 (0)