diff options
| author | Volpeon <git@volpeon.ink> | 2026-07-26 11:57:13 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2026-07-26 11:57:13 +0200 |
| commit | 5c899b4a5c2c07398151960b2b86d238b49d5bf4 (patch) | |
| tree | ccc743f27ba234a25396cb24b6124c139d13b027 /corvos.config.ts | |
| parent | Use Corvos 0.1.4 (diff) | |
| download | corvos-website-master.tar.gz corvos-website-master.tar.bz2 corvos-website-master.zip | |
Diffstat (limited to 'corvos.config.ts')
| -rw-r--r-- | corvos.config.ts | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/corvos.config.ts b/corvos.config.ts index fd9826c..0cb3900 100644 --- a/corvos.config.ts +++ b/corvos.config.ts | |||
| @@ -22,11 +22,12 @@ import { timestamps } from "corvos/plugins/timestamps.ts"; | |||
| 22 | import { transformImages } from "corvos/plugins/transform_images.ts"; | 22 | import { transformImages } from "corvos/plugins/transform_images.ts"; |
| 23 | import { urls } from "corvos/plugins/urls.ts"; | 23 | import { urls } from "corvos/plugins/urls.ts"; |
| 24 | 24 | ||
| 25 | import type { Node } from "$/deps/strapi.tsx"; | 25 | import type { Node } from "$/deps/strapi.ts"; |
| 26 | import type { PageData } from "$/schemas/mod.ts"; | 26 | import type { PageData } from "$/schemas/mod.ts"; |
| 27 | 27 | ||
| 28 | import { strapi } from "$/deps/strapi.tsx"; | 28 | import { strapi } from "$/deps/strapi.ts"; |
| 29 | import { pageDataSchema } from "$/schemas/mod.ts"; | 29 | import { pageDataSchema } from "$/schemas/mod.ts"; |
| 30 | import { releaseStrapiSchema } from "$/schemas/releases.ts"; | ||
| 30 | 31 | ||
| 31 | const assetPipeline = Pipeline.create() | 32 | const assetPipeline = Pipeline.create() |
| 32 | .use(cache()) | 33 | .use(cache()) |
| @@ -53,7 +54,23 @@ const pagePipeline = Pipeline.create() | |||
| 53 | .use(modules<Page<".strapi", Node[], PageData> | Page<".", Uint8Array<ArrayBuffer>>>()) | 54 | .use(modules<Page<".strapi", Node[], PageData> | Page<".", Uint8Array<ArrayBuffer>>>()) |
| 54 | .use(markdown({ frontmatterSchema: pageDataSchema })) | 55 | .use(markdown({ frontmatterSchema: pageDataSchema })) |
| 55 | .use(mdx({ frontmatterSchema: pageDataSchema })) | 56 | .use(mdx({ frontmatterSchema: pageDataSchema })) |
| 56 | .use(strapi()) | 57 | .use( |
| 58 | strapi({ | ||
| 59 | url: Deno.env.get("STRAPI_URL") ?? "", | ||
| 60 | token: Deno.env.get("STRAPI_TOKEN") ?? "", | ||
| 61 | content: { | ||
| 62 | "corvos-releases": { | ||
| 63 | type: "collection", | ||
| 64 | schema: releaseStrapiSchema, | ||
| 65 | query: { | ||
| 66 | "populate[0]": "files", | ||
| 67 | "sort[0]": "date:desc", | ||
| 68 | "sort[1]": "version:desc", | ||
| 69 | }, | ||
| 70 | }, | ||
| 71 | }, | ||
| 72 | }), | ||
| 73 | ) | ||
| 57 | .use(jsx()) | 74 | .use(jsx()) |
| 58 | .use(urls({ base: new URL("https://corvos.volpeon.ink/") })) | 75 | .use(urls({ base: new URL("https://corvos.volpeon.ink/") })) |
| 59 | 76 | ||
