Skip to content

Commit 9d74ea2

Browse files
authored
Merge branch 'main' into v6
2 parents 8f91a3a + 342d701 commit 9d74ea2

File tree

238 files changed

+1308
-446
lines changed

Some content is hidden

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

238 files changed

+1308
-446
lines changed

.github/workflows/contributors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
run: pnpm tsm --require=./scripts/lib/filter-warnings.cjs ./scripts/weekly-contributors.ts
2424

2525
- name: Create Pull Request
26-
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
26+
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
2727
with:
2828
branch: ci/contributors
2929
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}

.github/workflows/nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Create Pull Request
3737
id: createpr
38-
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
38+
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
3939
with:
4040
branch: ${{ matrix.PR_BRANCH }}
4141
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
@@ -76,7 +76,7 @@ jobs:
7676

7777
- name: Create Pull Request
7878
id: createpr
79-
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
79+
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
8080
with:
8181
branch: ${{ matrix.PR_BRANCH }}
8282
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"lunaria:build": "tsm ./scripts/lunaria.mts"
2424
},
2525
"devDependencies": {
26-
"@11ty/eleventy-fetch": "^5.1.0",
2726
"@actions/core": "^1.11.1",
2827
"@docsearch/css": "3.5.1",
2928
"@docsearch/js": "3.5.1",

pnpm-lock.yaml

Lines changed: 0 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/_redirects

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,15 @@
3535
/:lang/tutorials/add-view-transitions/ /:lang/guides/view-transitions/
3636
/:lang/guides/rss/ /:lang/recipes/rss/
3737
/:lang/basics/astro-syntax/ /:lang/reference/astro-syntax/
38-
/:lang/reference/experimental-flags/sessions/ /:lang/guides/sessions/
39-
/:lang/reference/experimental-flags/svg/ /:lang/guides/images/
40-
/:lang/reference/experimental-flags/serialized-configuration/ /:lang/reference/modules/astro-config/
41-
/:lang/reference/experimental-flags/responsive-images/ /:lang/guides/images/
38+
/:lang/reference/experimental-flags/sessions/ /:lang/guides/sessions/
39+
/:lang/reference/experimental-flags/svg/ /:lang/guides/images/
40+
/:lang/reference/experimental-flags/serialized-configuration/ /:lang/reference/modules/astro-config/
41+
/:lang/reference/experimental-flags/responsive-images/ /:lang/guides/images/
42+
/:lang/guides/deploy/sst/ /:lang/guides/deploy/aws-via-sst/
43+
/:lang/guides/deploy/flightcontrol/ /:lang/guides/deploy/aws-via-flightcontrol/
44+
/:lang/guides/deploy/google-firebase/ /:lang/guides/deploy/firebase/
45+
/:lang/guides/backend/google-firebase/ /:lang/guides/backend/firebase/
46+
/:lang/guides/backend/appwriteio/ /:lang/guides/backend/appwrite/
4247

4348

4449
# Very old docs site redirects
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
---
22
import { englishPages } from '~/content';
33
import { isBackendEntry } from '~/content.config';
4-
import { isLogoKey } from '~/data/logos';
54
import { getLanguageFromURL } from '~/util/path-utils';
65
import CardsNav from './NavGrid/CardsNav.astro';
76
87
const lang = getLanguageFromURL(Astro.url.pathname);
98
const enPages = englishPages.filter(isBackendEntry);
109
1110
const links = enPages
12-
.sort((a, b) => {
13-
// Sort alphabetically.
14-
return a.data.service.toLowerCase() > b.data.service.toLowerCase() ? 1 : -1;
15-
})
11+
// Sort alphabetically.
12+
.sort((a, b) => (a.id > b.id ? 1 : -1))
1613
.map((page) => {
17-
const { service } = page.data;
14+
const { logo, sidebar } = page.data;
15+
if (!sidebar.label) throw new Error('Backend guides must always include a sidebar label.');
1816
const pageUrl = '/' + page.id.replace('en/', `${lang}/`) + '/';
19-
const logo = isLogoKey(page.id.split('/').pop());
20-
return { title: service, href: pageUrl, logo };
17+
return { title: sidebar.label, href: pageUrl, logo };
2118
});
2219
---
2320

2421
<section>
25-
<CardsNav minimal links={links} />
22+
<CardsNav links={links} />
2623
</section>
Lines changed: 16 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2+
import { englishPages } from '~/content';
23
import { getLanguageFromURL } from '~/util/path-utils';
4+
import { isDeployEntry } from '~/content.config';
35
import CardsNav from './NavGrid/CardsNav.astro';
4-
import type { LogoKey } from '~/data/logos';
56
67
export interface Props {
78
minimal?: boolean;
@@ -10,54 +11,20 @@ export interface Props {
1011
const { minimal } = Astro.props as Props;
1112
1213
const lang = getLanguageFromURL(Astro.url.pathname);
14+
const enPages = englishPages.filter(isDeployEntry);
1315
14-
interface Service {
15-
title: string;
16-
slug: LogoKey;
17-
supports: ['ssr', 'static'] | ['ssr'] | ['static'];
18-
}
19-
20-
const services: Service[] = [
21-
{ title: 'Netlify', slug: 'netlify', supports: ['ssr', 'static'] },
22-
{ title: 'Vercel', slug: 'vercel', supports: ['ssr', 'static'] },
23-
{ title: 'Deno Deploy', slug: 'deno', supports: ['ssr', 'static'] },
24-
{ title: 'GitHub Pages', slug: 'github', supports: ['static'] },
25-
{ title: 'GitLab Pages', slug: 'gitlab', supports: ['static'] },
26-
{ title: 'Cloudflare Pages', slug: 'cloudflare', supports: ['ssr', 'static'] },
27-
{ title: 'AWS', slug: 'aws', supports: ['ssr', 'static'] },
28-
{ title: 'AWS via Flightcontrol', slug: 'flightcontrol', supports: ['ssr', 'static'] },
29-
{ title: 'AWS via SST', slug: 'sst', supports: ['ssr', 'static'] },
30-
{ title: 'Clever Cloud', slug: 'clever-cloud', supports: ['ssr', 'static'] },
31-
{ title: 'Azion', slug: 'azion', supports: ['ssr', 'static'] },
32-
{ title: 'Google Cloud', slug: 'google-cloud', supports: ['ssr', 'static'] },
33-
{ title: 'Google Firebase', slug: 'google-firebase', supports: ['ssr', 'static'] },
34-
{ title: 'Heroku', slug: 'heroku', supports: ['static'] },
35-
{ title: 'Microsoft Azure', slug: 'microsoft-azure', supports: ['static'] },
36-
{ title: 'Buddy', slug: 'buddy', supports: ['static'] },
37-
{ title: 'DeployHQ', slug: 'deployhq', supports: ['static'] },
38-
{ title: 'Fleek', slug: 'fleek', supports: ['static'] },
39-
{ title: 'Fly.io', slug: 'flyio', supports: ['ssr', 'static'] },
40-
{ title: 'Juno', slug: 'juno', supports: ['static'] },
41-
{ title: 'Railway', slug: 'railway', supports: ['ssr', 'static'] },
42-
{ title: 'Render', slug: 'render', supports: ['static'] },
43-
{ title: 'Stormkit', slug: 'stormkit', supports: ['static'] },
44-
{ title: 'Surge', slug: 'surge', supports: ['static'] },
45-
{ title: 'Cleavr', slug: 'cleavr', supports: ['ssr', 'static'] },
46-
{ title: 'Kinsta', slug: 'kinsta', supports: ['ssr', 'static'] },
47-
{ title: 'Zeabur', slug: 'zeabur', supports: ['ssr', 'static'] },
48-
{ title: 'Zerops', slug: 'zerops', supports: ['ssr', 'static'] },
49-
{ title: 'CloudRay', slug: 'cloudray', supports: ['static'] },
50-
{ title: 'Seenode', slug: 'seenode', supports: ['ssr'] },
51-
{ title: 'Zephyr', slug: 'zephyr', supports: ['static'] },
52-
];
16+
const links = enPages
17+
// Sort alphabetically.
18+
.sort((a, b) => (a.id > b.id ? 1 : -1))
19+
.map((page) => {
20+
const { logo, sidebar, supports } = page.data;
21+
if (!sidebar.label) throw new Error('Deploy guides must always include a sidebar label.');
22+
const pageUrl = '/' + page.id.replace('en/', `${lang}/`) + '/';
23+
const tags = Object.fromEntries(supports.map((s) => [s, Astro.locals.t(`deploy.${s}Tag`)!]));
24+
return { title: sidebar.label, href: pageUrl, logo, tags };
25+
});
5326
---
5427

55-
<CardsNav
56-
minimal={minimal}
57-
links={services.map(({ title, slug, supports }) => ({
58-
title,
59-
href: `/${lang}/guides/deploy/${slug}/`,
60-
logo: slug,
61-
tags: Object.fromEntries(supports.map((s) => [s, Astro.locals.t(`deploy.${s}Tag`)!])),
62-
}))}
63-
/>
28+
<section>
29+
<CardsNav minimal={minimal} links={links} />
30+
</section>

src/components/NavGrid/CardsNav.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@ const currentPage = new URL(Astro.request.url).pathname;
5959

6060
.tags {
6161
gap: 0.5rem;
62+
flex-wrap: wrap;
6263
}
6364
</style>

src/components/RightSidebar/LearnAstroAd.astro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ const headingId = `learn-astro-course-${idCount}`;
2626
<span>•</span>
2727
<span>Astro v5 ready</span>
2828
</p>
29-
<LinkButton href={offerUrl} class="cta" data-learn-astro-cta>Get 33% off</LinkButton>
29+
<LinkButton href={offerUrl} class="cta" data-learn-astro-cta>
30+
<span>Black Friday! Get <strong>33% off</strong></span>
31+
</LinkButton>
3032
</aside>
3133
</div>
3234

@@ -96,6 +98,7 @@ const headingId = `learn-astro-course-${idCount}`;
9698
.cta {
9799
grid-area: cta;
98100
text-align: center;
101+
text-wrap: balance;
99102
justify-content: center;
100103
font-size: var(--sl-text-sm) !important;
101104
font-weight: 500;
@@ -105,6 +108,9 @@ const headingId = `learn-astro-course-${idCount}`;
105108
.cta:hover {
106109
opacity: 0.8;
107110
}
111+
.cta strong {
112+
text-transform: uppercase;
113+
}
108114

109115
/* When there’s room, tuck the tagline in under the title to the right of the image. */
110116
@container (width > 24rem) {

src/components/Since.astro

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
import { cachedFetch } from '~/util/cachedFetch';
32
import Badge from '~/components/Badge.astro';
3+
import { getLatestNPMVersion } from '~/util/getLatestNPMVersion';
44
export interface Props {
55
pkg?: string;
66
v: string;
@@ -19,12 +19,9 @@ const parseSemVer = (semver: string) =>
1919
* For example, `@version 0.24.0` will be new as long as `astro@latest` is 0.24.x
2020
*/
2121
const getFeatureStatus = async (sinceVersion: string): Promise<'beta' | 'new' | 'current'> => {
22-
const astroInfo = await cachedFetch(`https://registry.npmjs.org/${pkg}/latest`).then((res) =>
23-
res.json()
24-
);
25-
const latestAstroVersion = astroInfo.version;
22+
const latestVersion = await getLatestNPMVersion(pkg);
2623
const [sinceMajor, sinceMinor] = parseSemVer(sinceVersion);
27-
const [latestMajor, latestMinor] = parseSemVer(latestAstroVersion);
24+
const [latestMajor, latestMinor] = parseSemVer(latestVersion);
2825
if (sinceMajor > latestMajor) {
2926
return 'beta';
3027
}

0 commit comments

Comments
 (0)