Skip to content
Compare
Choose a tag to compare
@astrobot-houston astrobot-houston released this 05 Apr 17:41
· 3876 commits to main since this release
29e7b82

Minor Changes

  • #6703 a1108e037 Thanks @Princesseuh! - Move image() to come from schema instead to fix it not working with refine and inside complex types

    Migration:

    Remove the image import from astro:content, and instead use a function to generate your schema, like such:

    import { defineCollection, z } from 'astro:content';
    
    defineCollection({
      schema: ({ image }) =>
        z.object({
          image: image().refine((img) => img.width >= 200, {
            message: 'image too small',
          }),
        }),
    });
  • #6714 ff0430786 Thanks @bluwy! - Add build.assetsPrefix option for CDN support. If set, all Astro-generated asset links will be prefixed with it. For example, setting it to https://cdn.example.com would generate https://cdn.example.com/_astro/penguin.123456.png links.

    Also adds import.meta.env.ASSETS_PREFIX environment variable that can be used to manually create asset links not handled by Astro.

Patch Changes