Major Changes
-
#5891
05caf445d
Thanks @bholmesdev! - Remove deprecated Markdown APIs from Astro v0.X. This includesgetHeaders()
, the.astro
property for layouts, and therawContent()
andcompiledContent()
error messages for MDX. -
#5893
be901dc98
Thanks @matthewp! - Move getEntry to getEntryBySlugThis change moves
getEntry
togetEntryBySlug
and accepts a slug rather than an id.In order to improve support in
[id].astro
routes, particularly in SSR where you do not know what the id of a collection is. UsinggetEntryBySlug
instead allows you to map the[id]
param in your route to the entry. You can use it like this:--- import { getEntryBySlug } from 'astro:content'; const entry = await getEntryBySlug('docs', Astro.params.id); if (!entry) { return new Response(null, { status: 404, }); } --- <!-- You have an entry! Use it! -->
-
#5608
899214298
Thanks @konojunya! - A trailing slash will not be automatically appended toimport.meta.env.SITE
. Instead, it will be the value of thesite
config as is. This may affect usages of${import.meta.env.SITE}image.png
, which will need to be updated accordingly.
Minor Changes
-
#5901
a342a486c
Thanks @bluwy! - The fallback Svelte preprocessor will only be applied if a custompreprocess
option is not passed to thesvelte()
integration option, or in thesvelte.config.js
file.To support IDE autocompletion, or if you're migrating from
@astrojs/svelte
v1, you can create asvelte.config.js
file with:import { vitePreprocess } from '@astrojs/svelte'; export default { preprocess: vitePreprocess(), };
This file will also be generated by
astro add svelte
by default.
Patch Changes
-
#5855
16dc36a87
Thanks @natemoo-re! - Remove legacy compiler error handling -
#5884
ce5c5dbd4
Thanks @MoustaphaDev! - Add a theme toggle button to the error overlay -
#5845
e818cc046
Thanks @bluwy! - Fix importing client-side components with alias -
#5849
8c100a6fe
Thanks @bluwy! - Handle server restart from Vite plugins -
#5896
64b8082e7
Thanks @natemoo-re! - Update@astrojs/compiler
tov1.0.0
-
#5852
3a00ecb3e
Thanks @rishi-raj-jain! - Respectvite.envPrefix
if provided -
#5872
b66d7195c
Thanks @bluwy! - EnableskipLibCheck
by default