Make latest posts show first, fix special chars in URL and add new article

This commit is contained in:
Raven Scott
2024-09-18 18:46:51 -04:00
parent 838dc4c706
commit 4c97b608ee
3 changed files with 1385 additions and 4 deletions

View File

@ -42,7 +42,7 @@
<div class="container">
<h2>Recent Posts</h2>
<ul class="list-group list-group-flush">
<% blogPosts.forEach(post => { %>
<% blogPosts.sort((a, b) => new Date(b.date) - new Date(a.date)).forEach(post => { %>
<li class="list-group-item d-flex justify-content-between align-items-center py-4">
<div>
<h5 class="mb-1"><a href="/blog/<%= post.slug %>"> <%= post.title %> </a></h5>