Fix date on posts list
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user