Releases: withastro/astro
@astrojs/[email protected]
Major Changes
-
#12231
90ae100
Thanks @bluwy! - Handles the breaking change in Astro where content pages (including.mdx
pages located withinsrc/pages/
) no longer respond withcharset=utf-8
in theContent-Type
header.For MDX pages without layouts,
@astrojs/mdx
will automatically add the<meta charset="utf-8">
tag to the page by default. This reduces the boilerplate needed to write with non-ASCII characters. If your MDX pages have a layout, the layout component should include the<meta charset="utf-8">
tag.If you require
charset=utf-8
to render your page correctly, make sure that your layout components have the<meta charset="utf-8">
tag added.
[email protected]
Patch Changes
-
#12263
e9e8080
Thanks @Fryuni! - Fixes conflict between server islands and on-demand dynamic routes in the form of/[...rest]
or/[paramA]/[paramB]
. -
#12279
b781f88
Thanks @jsparkdev! - Update wrong error message -
#12273
c2ee963
Thanks @ascorbic! - Fixes an issue with some package managers where sites would not build if TypeScript was not installed. -
#12235
a75bc5e
Thanks @ematipico! - Fixes a bug where Astro Actions couldn't redirect to the correct pathname when there was a rewrite involved. -
#11839
ff522b9
Thanks @icaliman! - Fixes error when returning a top-levelnull
from an Astro file frontmatter -
#12272
388d237
Thanks @ascorbic! - Correctly handles local images when using a base path in SSR
@astrojs/[email protected]
Patch Changes
-
#11435
f32a7a8
Thanks @haivuw! - Fixes a bug whereastro:db:seed
couldn't access to the environment variableASTRO_DATABASE_FILE
-
Updated dependencies []:
- @astrojs/[email protected]
[email protected]
Patch Changes
-
#11823
a3d30a6
Thanks @DerTimonius! - fix: improve error message when inferSize is used in local images with the Image component -
#12227
8b1a641
Thanks @florian-lefebvre! - Fixes a case where environment variables would not be refreshed when usingastro:env
-
#12239
2b6daa5
Thanks @ematipico! - BREAKING CHANGE to the experimental Container API onlyChanges the default page rendering behavior of Astro components in containers, and adds a new option
partial: false
to render full Astro pages as before.Previously, the Container API was rendering all Astro components as if they were full Astro pages containing
<!DOCTYPE html>
by default. This was not intended, and now by default, all components will render as page partials: only the contents of the components without a page shell.To render the component as a full-fledged Astro page, pass a new option called
partial: false
torenderToString()
andrenderToResponse()
:import { experimental_AstroContainer as AstroContainer } from 'astro/container'; import Card from '../src/components/Card.astro'; const container = AstroContainer.create(); await container.renderToString(Card); // the string will not contain `<!DOCTYPE html>` await container.renderToString(Card, { partial: false }); // the string will contain `<!DOCTYPE html>`
[email protected]
[email protected]
Patch Changes
-
#12223
79ffa5d
Thanks @ArmandPhilippot! - Fixes a false positive reported by the dev toolbar Audit app where a label was considered missing when associated with a buttonThe
button
element can be used with a label (e.g. to create a switch) and should not be reported as an accessibility issue when used as a child of alabel
. -
#12199
c351352
Thanks @ematipico! - Fixes a regression in the computation ofAstro.currentLocale
-
#12222
fb55695
Thanks @ematipico! - Fixes an issue where the edge middleware couldn't correctly compute the client IP address when callingctx.clientAddress()
@astrojs/[email protected]
Patch Changes
- #12156
07754f5
Thanks @mingjunlu! - Adds missingxslURL
property toSitemapOptions
type.
@astrojs/[email protected]
Patch Changes
- #12157
925cff3
Thanks @bholmesdev! - Improves README configuration reference.
[email protected]
Minor Changes
-
#12226
51d13e2
Thanks @ematipico! - The following renderer fields and integration fields now acceptURL
as a type:Renderers:
AstroRenderer.clientEntrpoint
AstroRenderer.serverEntrypoint
Integrations:
InjectedRoute.entrypoint
AstroIntegrationMiddleware.entrypoint
DevToolbarAppEntry.entrypoint
Patch Changes
-
#12168
1cd3085
Thanks @ascorbic! - Allows "slug" as a field in content layer data -
#12169
15fa9ba
Thanks @ematipico! - Fixes a bug where configured redirects were incorrectly constructed when reading the file system.This caused an issue where configuring a redirect in
astro.config.mjs
like{ /old: /new }
, failed to trigger the correct redirect in the dev server. -
#12169
15fa9ba
Thanks @ematipico! - Fixes a bug where the dev server was not providing a consistent user experience for configured redirects.With the fix, when you configure a redirect in
astro.config.mjs
like this{ /old: "/new" }
, the dev server return an HTML response that matches the one emitted by a static build.
@astrojs/[email protected]
@astrojs/markdoc
0.11.5-beta.1
Patch Changes
-
#12075
a19530e
Thanks @bluwy! - Parses frontmatter ourselves -
Updated dependencies [
a19530e
]:- @astrojs/[email protected]
0.11.5-beta.0
Patch Changes
- Updated dependencies [
5608338
]:- @astrojs/[email protected]
1.0.0-alpha.1
Patch Changes
-
#11825
560ef15
Thanks @bluwy! - Uses latest version of@astrojs/markdown-remark
with updated Shiki APIs -
Updated dependencies [
3ab3b4e
,560ef15
,3ab3b4e
]:- @astrojs/[email protected]
1.0.0-alpha.0
Patch Changes
- Updated dependencies [
b6fbdaa
,89bab1e
,d74617c
,83a2a64
,e90f559
,2df49a6
,8a53517
]:- [email protected]
- @astrojs/[email protected]
0.11.5
Patch Changes
- Updated dependencies [
710a1a1
]:- @astrojs/[email protected]
0.11.4
Patch Changes
- #11846
ed7bbd9
Thanks @HiDeoo! - Fixes an issue preventing to use Astro components as Markdoc tags and nodes when configured using theextends
property.
0.11.3
Patch Changes
- Updated dependencies [
49b5145
]:- @astrojs/[email protected]
0.11.2
Patch Changes
0.11.1
Patch Changes
- Updated dependencies [
b6afe6a
,41064ce
]:- @astrojs/[email protected]
- @astrojs/[email protected]
0.11.0
Minor Changes
Patch Changes
- #10833
8d5f3e8
Thanks @renovate! - Updatesesbuild
dependency to v0.20. This should not affect projects in most cases.
0.10.0
Minor Changes
-
#10689
683d51a5eecafbbfbfed3910a3f1fbf0b3531b99
Thanks @ematipico! - Deprecate support for versions of Node.js older thanv18.17.1
for Node.js 18, older thanv20.0.3
for Node.js 20, and the complete Node.js v19 release line.This change is in line with Astro's Node.js support policy.
Patch Changes
- Updated dependencies [
ccafa8d230f65c9302421a0ce0a0adc5824bfd55
,683d51a5eecafbbfbfed3910a3f1fbf0b3531b99
]:- @astrojs/[email protected]
- @astrojs/[email protected]
0.9.5
Patch Changes
-
#10649
90cfade88c2b9a34d8a5fe711ce329732d690409
Thanks @bholmesdev! - Add automatic resolution for Markdoc partials. This allows you to render other Markdoc files inside of a given entry. Reference files using thepartial
tag with afile
attribute for the relative file path:<!--src/content/blog/post.mdoc--> {% partial file="my-partials/_diagram.mdoc" /%} <!--src/content/blog/my-partials/_diagram.mdoc--> ## Diagram This partial will render inside of `post.mdoc.` ![Diagram](./diagram.png)
0.9.4
Patch Changes
-
#10632
da2fb875fc58b65a21d37a3d29f570fa20b5219c
Thanks @bluwy! - Moves@astrojs/markdown-remark
as a dependency -
Updated dependencies [
2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de
,374efcdff9625ca43309d89e3b9cfc9174351512
]:- @astrojs/[email protected]
0.9.3
Patch Changes
- Updated dependencies [
20463a6c1e1271d8dc3cb0ab3419ee5c72abd218
]:- @astrojs/[email protected]
0.9.2
Patch Changes
- Updated dependencies [
1ea0a25b94125e4f6f2ac82b42f638e22d7bdffd
]:- @astrojs/[email protected]
0.9.1
Patch Changes
- #10278
a548a3a99c2835c19662fc38636f92b2bda26614
Thanks @Princesseuh! - Fixes original images sometimes being kept / deleted when they shouldn't in both MDX and Markdoc
0.9.0
Minor Changes
-
#9958
14ce8a6ebfc9daf951d2dca54737d857c229667c
Thanks @Princesseuh! - Adds support for using a custom tag (component) for optimized imagesStarting from this version, when a tag called
image
is used, itssrc
attribute will automatically be resolved if it's a local image. Astro will pass the resultImageMetadata
object to the underlying component as thesrc
prop. For non-local images (i.e. images using URLs or absolute paths), Astro will continue to pass thesrc
as a string.// markdoc.config.mjs import { component, defineMarkdocConfig, nodes } from '@astrojs/markdoc/config'; export default defineMarkdocConfig({ tags: { image: { attributes: nodes.image.attributes, render: component('./src/components/MarkdocImage.astro'), }, }, });
--- // src/components/MarkdocImage.astro import { Image } from 'astro:assets'; interface Props { src: ImageMetadata | string; alt: string; width: number; height: number; } const { src, alt, width, height } = Astro.props; --- <Image {src} {alt} {width} {height} />
{% image src="./astro-logo.png" alt="Astro Logo" width="100" height="100" %}
0.8.3
Patch Changes
- #9643
e9a72d9a91a3741566866bcaab11172cb0dc7d31
Thanks @blackmann! - Removes unnecessaryshikiji
dependency
0.8.2
Patch Changes
- #9479
1baf0b0d3cbd0564954c2366a7278794fad6726e
Thanks @sarah11918! - Updates README
0.8.1
Patch Changes
- #9452
e83b5095f
Thanks @florian-lefebvre! - Upgrades vite to latest