Make latest posts show first, fix special chars in URL and add new article
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user