github withastro/astro astro@2.1.8

latest releases: astro@5.0.0-beta.2, @astrojs/vue@5.0.0-beta.0, @astrojs/svelte@6.0.0-beta.0...
18 months ago

Patch Changes

  • #6675 1f783e320 Thanks @matthewp! - Prevent frontmatter errors from crashing the dev server

  • #6688 2e92e9aa9 Thanks @JohannesKlauss! - Add a additional check for null on the req.body check in NodeApp.render.

  • #6578 adecda7d6 Thanks @wulinsheng123! - add new flag with open for dev and preview

  • #6680 386336441 Thanks @koriwi! - Invalidates cache when changing serviceEntryPoint

  • #6653 7c439868a Thanks @bholmesdev! - Simplify Markdoc configuration with a new markdoc.config.mjs file. This lets you import Astro components directly to render as Markdoc tags and nodes, without the need for the previous components property. This new configuration also unlocks passing variables to your Markdoc from the Content component (see the new docs).

    Migration

    Move any existing Markdoc config from your astro.config to a new markdoc.config.mjs file at the root of your project. This should be applied as a default export, with the optional defineMarkdocConfig() helper for autocomplete in your editor.

    This example configures an aside Markdoc tag. Note that components should be imported and applied to the render attribute directly, instead of passing the name as a string:

    // markdoc.config.mjs
    import { defineMarkdocConfig } from '@astrojs/markdoc/config';
    import Aside from './src/components/Aside.astro';
    
    export default defineMarkdocConfig({
      tags: {
        aside: {
          render: Aside,
        },
      },
    });

    You should also remove the components prop from your Content components. Since components are imported into your config directly, this is no longer needed.

    ---
    - import Aside from '../components/Aside.astro';
    import { getEntryBySlug } from 'astro:content';
    
    const entry = await getEntryBySlug('docs', 'why-markdoc');
    const { Content } = await entry.render();
    ---
    
    <Content
    - components={{ Aside }}
    />
  • #6639 25cd3e574 Thanks @tony-sull! - Fixes an attribute naming mismatch in the definition for elements in astro.JSX

  • #6353 4bf87c64f Thanks @wulinsheng123! - Throw better error when a dynamic endpoint without additional extensions is prerendered with undefined params.

  • #6643 fc0ed9c53 Thanks @Princesseuh! - Fix images not having the proper path when using base

Don't miss a new astro release

NewReleases is sending notifications on new releases.