-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Upgrade guide here](https://docs.astro.build/en/guides/upgrade-to/v5/#updating-existing-collections) - Renamed src/content/config.ts to src/content.config.ts - Updated collection declarations to be explicit and use loaders - Renamed all instances of 'slug' to 'id' - Fixed broken draft page functionality to use 'prod' instead of 'production' Test plan: - Confirm guides, collections and api docs render with no visual regressions
- Loading branch information
Showing
17 changed files
with
2,019 additions
and
1,445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { z, defineCollection } from 'astro:content'; | ||
import { glob } from 'astro/loaders'; | ||
|
||
const guides = defineCollection({ | ||
loader: glob({ pattern: '**/*.mdoc', base: "./src/content/guides" }), | ||
schema: z.object({ | ||
title: z.string(), | ||
description: z.string(), | ||
img: z.string().optional(), | ||
draft: z.boolean().optional().default(false), | ||
nav: z.object({ | ||
title: z.string().optional(), | ||
path: z.string(), | ||
order: z.number(), | ||
}), | ||
}), | ||
}); | ||
|
||
const connections = defineCollection({ | ||
loader: glob({ pattern: '**/*.mdoc', base: "./src/content/connections" }), | ||
schema: z.object({ | ||
title: z.string(), | ||
description: z.string(), | ||
img: z.string().optional(), | ||
draft: z.boolean().optional().default(false), | ||
nav: z.object({ | ||
title: z.string().optional(), | ||
path: z.string(), | ||
order: z.number(), | ||
}), | ||
}), | ||
}); | ||
|
||
const api = defineCollection({ | ||
loader: glob({ pattern: '**/*.mdoc', base: "./src/content/api" }), | ||
schema: z.object({ | ||
title: z.string(), | ||
description: z.string(), | ||
img: z.string().optional(), | ||
draft: z.boolean().optional().default(false), | ||
nav: z.object({ | ||
title: z.string().optional(), | ||
path: z.string(), | ||
order: z.number(), | ||
}), | ||
}), | ||
}); | ||
|
||
export const collections = { | ||
guides, | ||
connections, | ||
api, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
src/pages/connections/[...slug].astro → src/pages/connections/[...id].astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.