We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bff87de commit 91ff0d9Copy full SHA for 91ff0d9
1 file changed
src/routes/+layout.server.ts
@@ -14,7 +14,13 @@ export function load({ locals }) {
14
}
15
16
async function getSemesters(contentWrapper: ContentWrapper) {
17
- const projects: Project[] = await contentWrapper.get("project");
+ // const projects: Project[] = await contentWrapper.get("project");
18
+
19
+ // OPTIMIZATION: Only fetch the 'semester' field
20
+ // We use 'select' to filter out images, descriptions, and other heavy data
21
+ const projects: Project[] = await contentWrapper.get("project", {
22
+ select: "fields.semester",
23
+ });
24
25
const { semesters } = generateProjectsInfo(projects);
26
0 commit comments