From de90b3602bae9ef543961d2ad0cc53b52f0c0a45 Mon Sep 17 00:00:00 2001 From: dswbx Date: Fri, 29 Aug 2025 12:09:26 +0200 Subject: [PATCH] docs: added defaults to cloudflare image plugin --- .../cloudflare/image-optimization.plugin.ts | 19 ++++++++++++------- .../(documentation)/extending/plugins.mdx | 6 ++++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/app/src/plugins/cloudflare/image-optimization.plugin.ts b/app/src/plugins/cloudflare/image-optimization.plugin.ts index 7d0456e9..cd6742f9 100644 --- a/app/src/plugins/cloudflare/image-optimization.plugin.ts +++ b/app/src/plugins/cloudflare/image-optimization.plugin.ts @@ -20,28 +20,33 @@ type ImageOptimizationSchema = s.Static; export type CloudflareImageOptimizationOptions = { /** - * The url to access the image optimization plugin, defaults to `/api/plugin/image/optimize` + * The url to access the image optimization plugin + * @default /api/plugin/image/optimize */ accessUrl?: string; /** - * The path to resolve the image from, defaults to `/api/media/file` + * The path to resolve the image from + * @default /api/media/file */ resolvePath?: string; /** - * Whether to explain the image optimization schema, defaults to `false` + * Whether to explain the image optimization schema + * @default false */ explain?: boolean; /** - * The default options to use, defaults to `{}` - * @param: config + * The default options to use + * @default {} */ defaultOptions?: ImageOptimizationSchema; /** - * The fixed options to use, defaults to `{}` + * The fixed options to use + * @default {} */ fixedOptions?: ImageOptimizationSchema; /** - * The cache control to use, defaults to `public, max-age=31536000, immutable` + * The cache control to use + * @default public, max-age=31536000, immutable */ cacheControl?: string; }; diff --git a/docs/content/docs/(documentation)/extending/plugins.mdx b/docs/content/docs/(documentation)/extending/plugins.mdx index 7e8d777e..e18606ce 100644 --- a/docs/content/docs/(documentation)/extending/plugins.mdx +++ b/docs/content/docs/(documentation)/extending/plugins.mdx @@ -194,11 +194,13 @@ Now you can add query parameters for the transformations, e.g. `?width=1000&heig }, metadata: { description: 'The metadata to use', - type: '"copyright" | "keep" | "none"' + type: '"copyright" | "keep" | "none"', + default: 'copyright' }, quality: { description: 'The quality to use', - type: 'number' + type: 'number', + default: 85 }, }} />