diff options
author | 2022-08-15 00:26:33 -0400 | |
---|---|---|
committer | 2022-08-15 00:26:33 -0400 | |
commit | 0e2f4d74b77cc05b161afe69a8713935fe41591f (patch) | |
tree | 7ec5e614c1db4b7c577cd995e74d0d550e3b622e /examples/blog/src/pages/blog.astro | |
parent | 16edf0c7730d273771f75f959c9f8015a4f69238 (diff) | |
download | astro-0e2f4d74b77cc05b161afe69a8713935fe41591f.tar.gz astro-0e2f4d74b77cc05b161afe69a8713935fe41591f.tar.zst astro-0e2f4d74b77cc05b161afe69a8713935fe41591f.zip |
image fix (#4322)
Diffstat (limited to 'examples/blog/src/pages/blog.astro')
-rw-r--r-- | examples/blog/src/pages/blog.astro | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/blog/src/pages/blog.astro b/examples/blog/src/pages/blog.astro index 1ba45a36c..73576c498 100644 --- a/examples/blog/src/pages/blog.astro +++ b/examples/blog/src/pages/blog.astro @@ -7,7 +7,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../config'; // Use Astro.glob() to fetch all posts, and then sort them by date. const posts = (await Astro.glob('./blog/*.{md,mdx}')).sort( (a, b) => - new Date(b.frontmatter.publishDate).valueOf() - new Date(a.frontmatter.publishDate).valueOf() + new Date(b.frontmatter.pubDate).valueOf() - new Date(a.frontmatter.pubDate).valueOf() ); --- @@ -40,8 +40,8 @@ const posts = (await Astro.glob('./blog/*.{md,mdx}')).sort( <ul> {posts.map((post) => ( <li> - <time datetime={post.frontmatter.publishDate}> - {new Date(post.frontmatter.publishDate).toLocaleDateString('en-us', { + <time datetime={post.frontmatter.pubDate}> + {new Date(post.frontmatter.pubDate).toLocaleDateString('en-us', { year: 'numeric', month: 'short', day: 'numeric', |