Download packages/web/src/content.config.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 562 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/web/src/content.config.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/web/src/content.config.ts
-
curl -L -o content.config.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/web/src/content.config.ts
562 Bytes
| import { defineCollection, z } from "astro:content" | |
| import { docsLoader, i18nLoader } from "@astrojs/starlight/loaders" | |
| import { docsSchema, i18nSchema } from "@astrojs/starlight/schema" | |
| import en from "./content/i18n/en.json" | |
| const custom = Object.fromEntries(Object.keys(en).map((key) => [key, z.string()])) | |
| export const collections = { | |
| docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), | |
| i18n: defineCollection({ | |
| loader: i18nLoader(), | |
| schema: i18nSchema({ | |
| extend: z.object(custom).catchall(z.string()), | |
| }), | |
| }), | |
| } | |