refactor: move pubDate to date in posts front matter
This commit is contained in:
parent
123da1747f
commit
b2270003bd
15 changed files with 21 additions and 22 deletions
|
@ -10,7 +10,7 @@ const lang = getLangFromUrl(Astro.url);
|
|||
const t = useTranslations(lang);
|
||||
const translatePath = useTranslatedPath(lang);
|
||||
const posts = await getCollection('posts');
|
||||
posts.sort((a, b) => new Date(b.data.pubDate).getTime() - new Date(a.data.pubDate).getTime());
|
||||
posts.sort((a, b) => new Date(b.data.date).getTime() - new Date(a.data.date).getTime());
|
||||
---
|
||||
|
||||
<Layout title="Blog Posts" description="List all posts on the website.">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue