Fix date on posts list

This commit is contained in:
2026-08-13 12:38:00 -05:00
parent 40695352ad
commit 4927c33753
2 changed files with 3 additions and 2 deletions

View File

@@ -41,7 +41,7 @@
<div id="sticky-posts-section"> <div id="sticky-posts-section">
<h2>Pinned posts</h2> <h2>Pinned posts</h2>
<ul> <ul>
<li><a href="https://hexstudios.co/post.html?file=about.md">About | 2026-08-13</a></li> <li><a href="https://hexstudios.co/post.html?file=about.md">About // August 13, 2026</a></li>
</ul> </ul>
</div> </div>
@@ -65,7 +65,7 @@
posts.forEach(post => { posts.forEach(post => {
const li = document.createElement('li'); const li = document.createElement('li');
const a = document.createElement('a'); const a = document.createElement('a');
a.textContent = post.title + " | " + post.date; a.textContent = post.title + " // " + post.date;
a.href = post.type === 'html' a.href = post.type === 'html'
? 'posts/' + post.file ? 'posts/' + post.file
: 'post.html?file=' + encodeURIComponent(post.file); : 'post.html?file=' + encodeURIComponent(post.file);

View File

@@ -40,6 +40,7 @@ foreach ($files as $file) {
'title' => $title, 'title' => $title,
'type' => $ext, 'type' => $ext,
'created' => $date ?: $created, 'created' => $date ?: $created,
'date' => date('F j, Y', $date ?: $created),
]; ];
} }