mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
sort newest to oldest (#11587)
* sort newest to oldest * Update pubDate to preserve a meaningful order in the examples/blog folder
This commit is contained in:
parent
196092ae69
commit
6e5676862b
7 changed files with 7 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: 'Markdown Style Guide'
|
||||
description: 'Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.'
|
||||
pubDate: 'Jul 01 2022'
|
||||
pubDate: 'Jun 19 2024'
|
||||
heroImage: '/blog-placeholder-1.jpg'
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: 'Using MDX'
|
||||
description: 'Lorem ipsum dolor sit amet'
|
||||
pubDate: 'Jul 02 2022'
|
||||
pubDate: 'Jun 01 2024'
|
||||
heroImage: '/blog-placeholder-5.jpg'
|
||||
---
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import { getCollection } from 'astro:content';
|
|||
import FormattedDate from '../../components/FormattedDate.astro';
|
||||
|
||||
const posts = (await getCollection('blog')).sort(
|
||||
(a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf()
|
||||
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()
|
||||
);
|
||||
---
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import { getCollection } from 'astro:content';
|
|||
import FormattedDate from '../../components/FormattedDate.astro';
|
||||
|
||||
const posts = (await getCollection('blog')).sort(
|
||||
(a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf()
|
||||
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()
|
||||
);
|
||||
---
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import { getCollection } from 'astro:content';
|
|||
import FormattedDate from '../../components/FormattedDate.astro';
|
||||
|
||||
const posts = (await getCollection('blog')).sort(
|
||||
(a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf()
|
||||
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()
|
||||
);
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: 'Using MDX'
|
||||
description: 'Lorem ipsum dolor sit amet'
|
||||
pubDate: 'Jul 02 2022'
|
||||
pubDate: 'Jun 01 2024'
|
||||
heroImage: '/placeholder-hero.jpg'
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: 'Using MDX'
|
||||
description: 'Lorem ipsum dolor sit amet'
|
||||
pubDate: 'Jul 02 2022'
|
||||
pubDate: 'Jun 01 2024'
|
||||
heroImage: '/placeholder-hero.jpg'
|
||||
---
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue