@levino/shipyard-docs 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-docs",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Documentation plugin for shipyard with automatic sidebar, pagination, and git metadata",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -27,7 +27,7 @@
27
27
  "effect": "^3.20.0",
28
28
  "ramda": "^0.31",
29
29
  "unist-util-visit": "^5.0.0",
30
- "@levino/shipyard-base": "^0.8.1"
30
+ "@levino/shipyard-base": "^0.8.2"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@tailwindcss/typography": "^0.5.16",
package/src/index.ts CHANGED
@@ -87,13 +87,14 @@ const docsSchemaBase = (image: () => z.ZodType) =>
87
87
  /** SEO keywords */
88
88
  keywords: z.array(z.string()).optional(),
89
89
  /**
90
- * Social preview image. Accepts either:
91
- * - A relative path to a local image file (e.g. `./hero.png`), which is
92
- * automatically optimized to 1200×630 JPEG for OG/Twitter cards.
93
- * - An absolute URL (e.g. `https://example.com/og.jpg`), passed through
94
- * verbatim.
90
+ * Social preview image. Must be a relative path to a local image file
91
+ * (e.g. `./hero.png`). Astro's `image()` schema helper turns the path
92
+ * into an `ImageMetadata` reference, which shipyard runs through Astro's
93
+ * image pipeline at build time to produce a 1200×630 JPEG variant for
94
+ * OG/Twitter cards. Drop in a phone-camera JPEG and shipyard handles the
95
+ * cropping, downscaling and EXIF stripping.
95
96
  */
96
- image: z.union([image(), z.string().url()]).optional(),
97
+ image: image().optional(),
97
98
  /** Custom canonical URL */
98
99
  canonicalUrl: z.string().optional(),
99
100
  /** Custom canonical URL - snake_case alias for Docusaurus compatibility */