summaryrefslogtreecommitdiff
path: root/examples/blog/src
diff options
context:
space:
mode:
authorGravatar Princesseuh <Princesseuh@users.noreply.github.com> 2022-11-08 18:39:22 +0000
committerGravatar fredkbot <fred+astrobot@astro.build> 2022-11-08 18:39:22 +0000
commitdcdeca56acb6c03d4868ece51ef4611e7598e270 (patch)
treef8731cc4f82f335c00a4a9a7f4b573d277b84a3e /examples/blog/src
parent0dcdc6fb1e6160c8a225a65c4810f565e2b673b5 (diff)
downloadastro-dcdeca56acb6c03d4868ece51ef4611e7598e270.tar.gz
astro-dcdeca56acb6c03d4868ece51ef4611e7598e270.tar.zst
astro-dcdeca56acb6c03d4868ece51ef4611e7598e270.zip
[ci] format
Diffstat (limited to 'examples/blog/src')
-rw-r--r--examples/blog/src/layouts/BlogPost.astro12
-rw-r--r--examples/blog/src/pages/blog.astro26
2 files changed, 21 insertions, 17 deletions
diff --git a/examples/blog/src/layouts/BlogPost.astro b/examples/blog/src/layouts/BlogPost.astro
index 67f297444..4baf8e972 100644
--- a/examples/blog/src/layouts/BlogPost.astro
+++ b/examples/blog/src/layouts/BlogPost.astro
@@ -40,11 +40,13 @@ const {
{heroImage && <img width={720} height={360} src={heroImage} alt="" />}
<h1 class="title">{title}</h1>
{pubDate && <time>{pubDate}</time>}
- {updatedDate && (
- <div>
- Last updated on <time>{updatedDate}</time>
- </div>
- )}
+ {
+ updatedDate && (
+ <div>
+ Last updated on <time>{updatedDate}</time>
+ </div>
+ )
+ }
<hr />
<slot />
</article>
diff --git a/examples/blog/src/pages/blog.astro b/examples/blog/src/pages/blog.astro
index c50cc0528..cedf505b0 100644
--- a/examples/blog/src/pages/blog.astro
+++ b/examples/blog/src/pages/blog.astro
@@ -37,18 +37,20 @@ const posts = (await Astro.glob('./blog/*.{md,mdx}')).sort(
<main>
<section>
<ul>
- {posts.map((post) => (
- <li>
- <time datetime={post.frontmatter.pubDate}>
- {new Date(post.frontmatter.pubDate).toLocaleDateString('en-us', {
- year: 'numeric',
- month: 'short',
- day: 'numeric',
- })}
- </time>
- <a href={post.url}>{post.frontmatter.title}</a>
- </li>
- ))}
+ {
+ posts.map((post) => (
+ <li>
+ <time datetime={post.frontmatter.pubDate}>
+ {new Date(post.frontmatter.pubDate).toLocaleDateString('en-us', {
+ year: 'numeric',
+ month: 'short',
+ day: 'numeric',
+ })}
+ </time>
+ <a href={post.url}>{post.frontmatter.title}</a>
+ </li>
+ ))
+ }
</ul>
</section>
</main>