Skip to content

Commit

Permalink
fix: about and posts links now work when site is hosted
Browse files Browse the repository at this point in the history
My favourite kind of fix, just cheat! These relative links can't break
the way that they did anymore if the template is in the same directory
as all the other files that link to one another.
  • Loading branch information
chrisnewtn committed Feb 20, 2024
1 parent 72728a7 commit af81768
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pages/posts/2024-01-27-posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Posts!
date-published: 2024-01-27
draft: true
template: ../../templates/post.html
template: post.template.html
tags:
- blog
---
Expand Down
12 changes: 6 additions & 6 deletions templates/post.html → pages/posts/post.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<link rel="stylesheet" href="../pages/style.css">
<link rel="stylesheet" href="../pages/posts.css">
<link rel="stylesheet" href="../style.css">
<link rel="stylesheet" href="../posts.css">
</head>
<body>
<header class="site-wide">
<div class="banner">
<h1 class="logo">Chris Newton</h1>
<a href="https://github.com/chrisnewtn" rel="me">
<picture class="social">
<source srcset="../pages/assets/github-mark-white.svg" media="(prefers-color-scheme: dark)">
<img src="../pages/assets/github-mark.svg" alt="The GitHub Octocat logo">
<source srcset="../assets/github-mark-white.svg" media="(prefers-color-scheme: dark)">
<img src="../assets/github-mark.svg" alt="The GitHub Octocat logo">
</picture>
</a>
</div>
<nav>
<ul>
<li><a href="../public/index.html">About</a></li>
<li><a href="../public/posts/index.html">Posts</a></li>
<li><a href="../index.html">About</a></li>
<li><a href="index.html">Posts</a></li>
</ul>
</nav>
</header>
Expand Down

0 comments on commit af81768

Please sign in to comment.