diff options
author | 2024-08-05 06:30:06 -0500 | |
---|---|---|
committer | 2024-08-05 13:30:06 +0200 | |
commit | 6e5676862b98ed5cadf1bc3d1920d992820ab936 (patch) | |
tree | b16a9461e57b5f283e259bc974281b5e7f5740cd /examples/blog | |
parent | 196092ae69eb1249206846ddfc162049b03f42b4 (diff) | |
download | astro-6e5676862b98ed5cadf1bc3d1920d992820ab936.tar.gz astro-6e5676862b98ed5cadf1bc3d1920d992820ab936.tar.zst astro-6e5676862b98ed5cadf1bc3d1920d992820ab936.zip |
sort newest to oldest (#11587)
* sort newest to oldest
* Update pubDate to preserve a meaningful order in the examples/blog folder
Diffstat (limited to 'examples/blog')
-rw-r--r-- | examples/blog/src/content/blog/markdown-style-guide.md | 2 | ||||
-rw-r--r-- | examples/blog/src/content/blog/using-mdx.mdx | 2 | ||||
-rw-r--r-- | examples/blog/src/pages/blog/index.astro | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/blog/src/content/blog/markdown-style-guide.md b/examples/blog/src/content/blog/markdown-style-guide.md index cf02c4198..fd3de1e88 100644 --- a/examples/blog/src/content/blog/markdown-style-guide.md +++ b/examples/blog/src/content/blog/markdown-style-guide.md @@ -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' --- diff --git a/examples/blog/src/content/blog/using-mdx.mdx b/examples/blog/src/content/blog/using-mdx.mdx index d976693e7..81603de4c 100644 --- a/examples/blog/src/content/blog/using-mdx.mdx +++ b/examples/blog/src/content/blog/using-mdx.mdx @@ -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' --- diff --git a/examples/blog/src/pages/blog/index.astro b/examples/blog/src/pages/blog/index.astro index ebbcd3042..5dfb9c9c6 100644 --- a/examples/blog/src/pages/blog/index.astro +++ b/examples/blog/src/pages/blog/index.astro @@ -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() ); --- |