Skip to content

Commit ba9a2d7

Browse files
authored
Merge branch 'withastro:main' into feature/infer-getstaticpaths-types
2 parents e9262b3 + 8b7cb64 commit ba9a2d7

222 files changed

Lines changed: 3700 additions & 2140 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/friendly-bobcats-warn.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/gorgeous-mails-sniff.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/grumpy-bees-worry.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/honest-beds-flow.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/lemon-flies-clean.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/tasty-planes-knock.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Preserve `--root` CLI flag when restarting dev server

examples/basics/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.0.6"
14+
"astro": "^2.0.10"
1515
}
1616
}

examples/blog/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"astro": "^2.0.6",
14+
"astro": "^2.0.10",
1515
"@astrojs/mdx": "^0.16.0",
1616
"@astrojs/rss": "^2.1.0",
1717
"@astrojs/sitemap": "^1.0.1"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
const { date } = Astro.props;
3+
---
4+
5+
<time datetime={date.toISOString()}>
6+
{
7+
date.toLocaleDateString('en-us', {
8+
year: 'numeric',
9+
month: 'short',
10+
day: 'numeric',
11+
})
12+
}
13+
</time>

examples/blog/src/layouts/BlogPost.astro

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { CollectionEntry } from 'astro:content';
33
import BaseHead from '../components/BaseHead.astro';
44
import Header from '../components/Header.astro';
55
import Footer from '../components/Footer.astro';
6+
import FormattedDate from '../components/FormattedDate.astro';
67
78
type Props = CollectionEntry<'blog'>['data'];
89
@@ -21,6 +22,9 @@ const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
2122
border-top: 1px solid #ddd;
2223
margin: 1rem 0;
2324
}
25+
.last-updated-on {
26+
font-style: italic;
27+
}
2428
</style>
2529
</head>
2630

@@ -30,11 +34,11 @@ const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
3034
<article>
3135
{heroImage && <img width={720} height={360} src={heroImage} alt="" />}
3236
<h1 class="title">{title}</h1>
33-
{pubDate && <time>{pubDate}</time>}
37+
<FormattedDate date={pubDate} />
3438
{
3539
updatedDate && (
36-
<div>
37-
Last updated on <time>{updatedDate}</time>
40+
<div class="last-updated-on">
41+
Last updated on <FormattedDate date={updatedDate} />
3842
</div>
3943
)
4044
}

0 commit comments

Comments
 (0)