Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

type Props = {
posts: Post[];
projects: CollectionEntry<"projects">[];
projects: CollectionEntry<"project">[];
};

const { posts: allPosts, projects }: Props = $props();
Expand Down
4 changes: 2 additions & 2 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const blog = defineCollection({
}),
});

const projects = defineCollection({
const project = defineCollection({
type: "content",
schema: z.object({
name: z.string(),
Expand All @@ -24,4 +24,4 @@ const projects = defineCollection({
}),
});

export const collections = { blog, projects };
export const collections = { blog, project };
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib/projects.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getCollection } from "astro:content";

export async function getProjects() {
const projects = await getCollection("projects");
const projects = await getCollection("project");
return projects.sort((a, b) => a.data.order - b.data.order);
}
Loading