-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/check-skip-sync
- Loading branch information
Showing
113 changed files
with
4,141 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Fixes a case where invalid `astro:env` variables at runtime would not throw correctly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
'astro': minor | ||
--- | ||
|
||
Experimental Server Islands | ||
|
||
Server Islands allow you to specify components that should run on the server, allowing the rest of the page to be more aggressively cached, or even generated statically. Turn any `.astro` component into a server island by adding the `server:defer` directive and optionally, fallback placeholder content: | ||
|
||
```astro | ||
--- | ||
import Avatar from '../components/Avatar.astro'; | ||
import GenericUser from '../components/GenericUser.astro'; | ||
--- | ||
<header> | ||
<h1>Page Title</h1> | ||
<div class="header-right"> | ||
<Avatar server:defer> | ||
<GenericUser slot="fallback" /> | ||
</Avatar> | ||
</div> | ||
</header> | ||
``` | ||
|
||
The `server:defer` directive can be used on any Astro component in a project using `hybrid` or `server` mode with an adapter. There are no special APIs needed inside of the island. | ||
|
||
Enable server islands by adding the experimental flag to your Astro config with an appropriate `output` mode and adatper: | ||
|
||
```js | ||
import { defineConfig } from 'astro/config'; | ||
import netlify from '@astrojs/netlify'; | ||
|
||
export default defineConfig({ | ||
output: 'hybrid', | ||
adapter: netlify(), | ||
experimental { | ||
serverIslands: true, | ||
}, | ||
}); | ||
``` | ||
|
||
For more information, see the [server islands documentation](https://docs.astro.build/en/reference/configuration-reference/#experimentalserverislands). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': minor | ||
--- | ||
|
||
Adds Shiki's [`defaultColor`](https://shiki.style/guide/dual-themes#without-default-color) option to the `<Code />` component, giving you more control in applying multiple themes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Fixes Astro not working on low versions of Node 18 and 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { defineConfig } from 'astro/config'; | ||
import nodejs from '@astrojs/node'; | ||
import react from '@astrojs/react'; | ||
import tailwind from '@astrojs/tailwind'; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
output: 'server', | ||
adapter: nodejs({ mode: 'standalone' }), | ||
integrations: [ | ||
react(), | ||
tailwind({ applyBaseStyles: false }) | ||
], | ||
devToolbar: { enabled: false }, | ||
experimental: { | ||
serverIslands: true, | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "@example/server-islands", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "astro dev", | ||
"start": "astro dev", | ||
"build": "astro build", | ||
"preview": "astro preview", | ||
"astro": "astro" | ||
}, | ||
"devDependencies": { | ||
"@astrojs/node": "^8.2.6", | ||
"@astrojs/react": "^3.6.0", | ||
"@astrojs/tailwind": "^5.1.0", | ||
"@fortawesome/fontawesome-free": "^6.5.2", | ||
"@tailwindcss/forms": "^0.5.7", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"astro": "workspace:*", | ||
"postcss": "^8.4.38", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"tailwindcss": "^3.4.3" | ||
} | ||
} |
Oops, something went wrong.