Skip to content

Commit 2be9b60

Browse files
[i18nIgnore] Update backend guides to use logo instead of service (#12759)
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
1 parent df37d7f commit 2be9b60

Some content is hidden

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

54 files changed

+66
-68
lines changed

public/_redirects

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +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/
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/
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/
4547

4648

4749
# Very old docs site redirects
Lines changed: 5 additions & 8 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) => {
1311
// Sort alphabetically.
14-
return a.data.service.toLowerCase() > b.data.service.toLowerCase() ? 1 : -1;
15-
})
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>

src/content.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const deploySchema = baseSchema.extend({
3131
export const backendSchema = baseSchema.extend({
3232
type: z.literal('backend'),
3333
stub: z.boolean().default(false),
34-
service: z.string(),
34+
logo: z.enum(logoKeys),
3535
});
3636

3737
export const cmsSchema = baseSchema.extend({

src/content/docs/en/guides/backend/appwriteio.mdx renamed to src/content/docs/en/guides/backend/appwrite.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Add a backend to your project with Appwrite
44
sidebar:
55
label: Appwrite
66
type: backend
7-
service: Appwrite
7+
logo: appwrite
88
stub: true
99
i18nReady: true
1010
---

src/content/docs/en/guides/backend/google-firebase.mdx renamed to src/content/docs/en/guides/backend/firebase.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Add a backend to your project with Firebase
44
sidebar:
55
label: Firebase
66
type: backend
7-
service: Firebase
7+
logo: firebase
88
stub: false
99
i18nReady: true
1010
---

src/content/docs/en/guides/backend/neon.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Add a serverless Postgres database to your Astro project with Neon
44
sidebar:
55
label: Neon
66
type: backend
7-
service: Neon
7+
logo: neon
88
stub: false
99
i18nReady: true
1010
---

src/content/docs/en/guides/backend/prisma-postgres.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Add a serverless Postgres database to your Astro project with Prism
44
sidebar:
55
label: Prisma Postgres
66
type: backend
7-
service: Prisma Postgres
7+
logo: 'prisma-postgres'
88
stub: false
99
i18nReady: true
1010
---

src/content/docs/en/guides/backend/sentry.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: How to monitor your Astro site with Sentry
44
sidebar:
55
label: Sentry
66
type: backend
7-
service: Sentry
7+
logo: sentry
88
stub: false
99
i18nReady: true
1010
---

src/content/docs/en/guides/backend/supabase.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Add a backend to your project with Supabase
44
sidebar:
55
label: Supabase
66
type: backend
7-
service: Supabase
7+
logo: supabase
88
i18nReady: true
99
---
1010
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'

src/content/docs/en/guides/backend/turso.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Build locally with a SQLite file and deploy globally using Turso.
44
sidebar:
55
label: Turso
66
type: backend
7-
service: Turso
7+
logo: turso
88
stub: false
99
i18nReady: true
1010
---

0 commit comments

Comments
 (0)