Skip to content

Commit 569ee34

Browse files
committed
chore: add reference data
1 parent 10d2692 commit 569ee34

24 files changed

+573
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"embla-carousel": "^8.6.0",
4343
"embla-carousel-autoplay": "^8.6.0",
4444
"embla-carousel-class-names": "^8.6.0",
45-
"limax": "^4.2.0",
45+
"limax": "^4.2.1",
4646
"pagefind": "^1.4.0",
4747
"rehype-autolink-headings": "^7.1.0",
4848
"rehype-slug": "^6.0.0",

pnpm-lock.yaml

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

src/content.config.ts

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { extendI18nLoaderSchema, i18nContentLoader, i18nLoader, localized as localizedSchema } from "astro-loader-i18n";
22
import { defineCollection, z, type ImageFunction } from "astro:content";
33
import { localeSlugs } from "./site.config";
4-
import { glob } from "astro/loaders";
4+
import { glob, file } from "astro/loaders";
55

66
const localized = <T extends z.ZodTypeAny>(schema: T) => localizedSchema(schema, localeSlugs);
77

@@ -24,7 +24,7 @@ const createNavigationItem = (image: ImageFunction) => {
2424
};
2525

2626
const navigationCollection = defineCollection({
27-
loader: i18nContentLoader({ pattern: "**/[^_]*.yml", base: "./src/content/navigation" }),
27+
loader: i18nContentLoader({ pattern: "**/[^_]*.yaml", base: "./src/content/navigation" }),
2828
schema: ({ image }) =>
2929
extendI18nLoaderSchema(
3030
z.object({
@@ -49,8 +49,34 @@ const sectionsCollection = defineCollection({
4949
schema: z.object({}),
5050
});
5151

52+
const referenceCompaniesCollection = defineCollection({
53+
loader: file("./src/content/references/companies/index.yaml"),
54+
schema: ({ image }) =>
55+
z.object({
56+
id: z.string(),
57+
companyName: z.string(),
58+
logo: image(),
59+
url: z.string().url().optional(),
60+
}),
61+
});
62+
63+
const referenceProjectsCollection = defineCollection({
64+
loader: i18nLoader({ pattern: "**/[^_]*.{md,mdx}", base: "./src/content/references/projects" }),
65+
schema: ({ image }) =>
66+
extendI18nLoaderSchema(
67+
z.object({
68+
softwareName: z.string(),
69+
title: z.string(),
70+
logo: image(),
71+
path: z.string().url().optional(),
72+
}),
73+
),
74+
});
75+
5276
export const collections = {
5377
navigation: navigationCollection,
5478
pages: pagesCollection,
5579
sections: sectionsCollection,
80+
referenceCompanies: referenceCompaniesCollection,
81+
referenceProjects: referenceProjectsCollection,
5682
};
File renamed without changes.
File renamed without changes.

src/content/references/companies/astra.svg

Lines changed: 305 additions & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
- id: astra
2+
companyName: Bundesamt für Strassen ASTRA
3+
logo: ./astra.svg
4+
url: https://www.astra.admin.ch
5+
- id: haslerrail
6+
companyName: HaslerRail AG
7+
logo: ./haslerrail.svg
8+
url: https://www.haslerrail.com
9+
- id: hydrowatt
10+
companyName: Hydrowatt AG
11+
logo: ./hydrowatt.svg
12+
url: https://www.hydrowatt.com
13+
- id: schalthalle
14+
companyName: Verein Schalthalle
15+
logo: ./schalthalle.svg
16+
url: https://www.schalthalle.ch
17+
- id: sto
18+
companyName: STO Innenausbau AG
19+
logo: ./sto.svg
20+
url: https://sto-innenausbau.ch
21+
- id: wagner
22+
companyName: Wagner Unternehmungen AG
23+
logo: ./wagner.svg
24+
url: https://wagner-rohbau.ch
25+
- id: wiegand
26+
companyName: Wiegand AG
27+
logo: ./wiegand.png
28+
url: https://wiegand.ch
29+
- id: yaver
30+
companyName: YAVER Infrastructure & Services GmbH
31+
logo: ./yaver.svg
32+
url: https://yaver.ch
33+
- id: zli
34+
companyName: Zürcher Lehrbetriebsverband ICT
35+
logo: ./zli.svg
36+
url: https://zli.ch
Lines changed: 70 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)