@levino/shipyard-blog 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.ts +7 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levino/shipyard-blog",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Blog plugin for shipyard with pagination, sidebar, and git metadata",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -33,7 +33,7 @@
33
33
  "license": "MIT",
34
34
  "homepage": "https://shipyard.levinkeller.de",
35
35
  "dependencies": {
36
- "@levino/shipyard-base": "^0.8.1",
36
+ "@levino/shipyard-base": "^0.8.2",
37
37
  "ramda": "^0.31",
38
38
  "yaml": "^2.8.3"
39
39
  },
package/src/index.ts CHANGED
@@ -95,13 +95,14 @@ export const blogSchema = ({ image }: { image: () => z.ZodType }) =>
95
95
  */
96
96
  tags: z.array(z.string()).optional(),
97
97
  /**
98
- * Social preview image for the post. Accepts either:
99
- * - A relative path to a local image file (e.g. `./hero.jpg`), which is
100
- * automatically optimized to 1200×630 JPEG for OG/Twitter cards.
101
- * - An absolute URL (e.g. `https://example.com/og.jpg`), passed through
102
- * verbatim.
98
+ * Social preview image for the post. Must be a relative path to a local
99
+ * image file (e.g. `./hero.jpg`). Astro's `image()` schema helper turns
100
+ * the path into an `ImageMetadata` reference, which shipyard runs through
101
+ * Astro's image pipeline at build time to produce a 1200×630 JPEG variant
102
+ * for OG/Twitter cards. Drop in a phone-camera JPEG and shipyard handles
103
+ * the cropping, downscaling and EXIF stripping.
103
104
  */
104
- image: z.union([image(), z.string().url()]).optional(),
105
+ image: image().optional(),
105
106
  /**
106
107
  * SEO keywords for the post.
107
108
  */