github withastro/astro astro@0.24.0

latest releases: @astrojs/svelte@6.0.1, astro@4.16.13, @astrojs/solid-js@4.4.3...
2 years ago

Minor Changes

  • #2760 77b9c953 Thanks @bholmesdev! - Introduce a new --host flag + host devOption to expose your server on a network IP

  • af075d81 Thanks @natemoo-re! - Visual redesign of the astro dev CLI, including new astro --help and astro --version outputs.

    These changes introduce a new startup screen, make it more obvious when a file triggers in-place HMR (update) or a full reload (reload), and improve the way Astro surfaces errors during dev.

  • #2705 72c2c86e Thanks @natemoo-re! - New default build strategy

    This change marks the "static build" as the new default build strategy. If you are unfamiliar with this build strategy check out the migration guide on how to change your code to be compatible with this new bulid strategy.

    If you'd like to keep using the old build strategy, use the flag --legacy-build both in your astro dev and astro build scripts, for ex:

    {
    	"scripts": {
    		"build": "astro build --legacy-build"
    	}
    }

    Note that the legacy build is deprecated and will be removed in a future version. You should only use this flag until you have the time to migration your code.

  • #2705 72c2c86e Thanks @natemoo-re! - ## Updated <head> and <body> behavior

    Since astro@0.21, Astro placed certain restrictions on what files could use <head> or <body> tags. In astro@0.24, the restrictions have been lifted. Astro will be able to correctly handle <head> and <body> tags in any component, not just those in src/pages/ or src/layouts/.

  • #2747 05b66bd6 Thanks @natemoo-re! - Escape HTML inside of expressions by default. Please see our migration guide for more details.

Patch Changes

  • #2695 ae8d9256 Thanks @natemoo-re! - Update Astro.slots API with new public has and render methods.

    This is a backwards-compatible change—Astro.slots.default will still be true if the component has been passed a default slot.

    if (Astro.slots.has('default')) {
    	const content = await Astro.slots.render('default');
    }
  • #2755 10843aba Thanks @natemoo-re! - Add user-configurable sitemapFilter option.

    This option can be used to ensure certain pages are excluded from your final sitemap.

    // astro.config.ts
    import type { AstroUserConfig } from 'astro'
    
    const config: AstroUserConfig = {
      sitemap: true,
      sitemapFilter: (page: string) => !page.includes('secret-page')
    }
    export default config
  • #2767 2bb2c2f7 Thanks @natemoo-re! - Update @astrojs/compiler to 0.12.0

  • #2705 72c2c86e Thanks @natemoo-re! - Fixes the static build to write to 404.html

  • #2705 72c2c86e Thanks @natemoo-re! - Fixes use of private .env variables with the static build

  • #2750 79fc3204 Thanks @FredKSchott! - update esbuild@0.14.25

  • #2737 e8d4e568 Thanks @natemoo-re! - Astro's logger has been redesigned for an improved experience! In addition to deduping identical messages, we've surfaced more error details and exposed new events like update (for in-place HMR) and reload (for full-reload HMR).

  • #2733 6bf124fb Thanks @FredKSchott! - Remove a bad dev warning

  • #2768 49c0d997 Thanks @matthewp! - Fixes loading astro/client/* on Windows in dev

  • #2758 499fb6a3 Thanks @natemoo-re! - Add CLI warnings when running a prerelease or outdated version of Astro

  • #2705 72c2c86e Thanks @natemoo-re! - Replace send dependency with sirv

  • #2732 0ae96bb7 Thanks @bholmesdev! - Update server start message to use localhost for local hostnames

  • #2743 a14075e2 Thanks @bholmesdev! - Fix - show 404 for bad static paths with console message, rather than a 500

Don't miss a new astro release

NewReleases is sending notifications on new releases.