From 00581b4ae5b02bdcc7b3e0f1f68884857a80ff59 Mon Sep 17 00:00:00 2001 From: = Date: Wed, 23 Aug 2023 12:51:29 +0100 Subject: [PATCH 1/4] Generate integration pages --- .../en/guides/integrations-guide/alpinejs.mdx | 6 +-- .../guides/integrations-guide/cloudflare.mdx | 34 ++++++++++----- .../en/guides/integrations-guide/deno.mdx | 6 +-- .../docs/en/guides/integrations-guide/lit.mdx | 4 +- .../en/guides/integrations-guide/markdoc.mdx | 4 +- .../docs/en/guides/integrations-guide/mdx.mdx | 4 +- .../en/guides/integrations-guide/netlify.mdx | 39 +++++------------- .../en/guides/integrations-guide/node.mdx | 8 ++-- .../guides/integrations-guide/partytown.mdx | 6 +-- .../en/guides/integrations-guide/preact.mdx | 41 +++++++++++++++++-- .../en/guides/integrations-guide/prefetch.mdx | 6 +-- .../en/guides/integrations-guide/react.mdx | 37 ++++++++++++++++- .../en/guides/integrations-guide/sitemap.mdx | 6 +-- .../en/guides/integrations-guide/solid-js.mdx | 39 +++++++++++++++++- .../en/guides/integrations-guide/svelte.mdx | 4 +- .../en/guides/integrations-guide/tailwind.mdx | 6 +-- .../en/guides/integrations-guide/vercel.mdx | 40 +++++++----------- .../docs/en/guides/integrations-guide/vue.mdx | 4 +- 18 files changed, 190 insertions(+), 104 deletions(-) diff --git a/src/content/docs/en/guides/integrations-guide/alpinejs.mdx b/src/content/docs/en/guides/integrations-guide/alpinejs.mdx index 665a9e465d082..c2bd9d3b6b225 100644 --- a/src/content/docs/en/guides/integrations-guide/alpinejs.mdx +++ b/src/content/docs/en/guides/integrations-guide/alpinejs.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/alpinejs/ +# https://github.com/withastro/astro/tree/next/packages/integrations/alpinejs/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/alpinejs' description: Learn how to use the @astrojs/alpinejs framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/alpinejs/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/alpinejs/' hasREADME: true category: renderer i18nReady: true @@ -112,7 +112,7 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/alpinejs/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/alpinejs/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx index 0d5d4b4cf0dfa..95a18062b4729 100644 --- a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx +++ b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/cloudflare/ +# https://github.com/withastro/astro/tree/next/packages/integrations/cloudflare/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/cloudflare' description: Learn how to use the @astrojs/cloudflare SSR adapter to deploy your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/cloudflare/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/cloudflare/' hasREADME: true category: adapter i18nReady: true @@ -65,23 +65,37 @@ export default defineConfig({ default `"advanced"` -Cloudflare Pages has 2 different modes for deploying functions, `advanced` mode which picks up the `_worker.js` in `dist`, or a directory mode where pages will compile the worker out of a functions folder in the project root. +Cloudflare Pages has 2 different modes for deploying functions, `advanced` mode which picks up the `_worker.js` in `dist`, or a directory mode where pages will compile the worker out of a functions folder in the project root. For most projects the adapter default of `advanced` will be sufficient; the `dist` folder will contain your compiled project. -For most projects the adapter default of `advanced` will be sufficient; the `dist` folder will contain your compiled project. Switching to directory mode allows you to use [pages plugins](https://developers.cloudflare.com/pages/platform/functions/plugins/) such as [Sentry](https://developers.cloudflare.com/pages/platform/functions/plugins/sentry/) or write custom code to enable logging. +#### `mode:directory` -In directory mode, the adapter will compile the client side part of your app the same way by default, but moves the worker script into a `functions` folder in the project root. In this case, the adapter will only ever place a `[[path]].js` in that folder, allowing you to add additional plugins and pages middleware which can be checked into version control. - -With the build configuration `split: true`, the adapter instead compiles a separate bundle for each page. This option requires some manual maintenance of the `functions` folder. Files emitted by Astro will overwrite existing `functions` files with identical names, so you must choose unique file names for each file you manually add. Additionally, the adapter will never empty the `functions` folder of outdated files, so you must clean up the folder manually when you remove pages. - -Note that this adapter does not support using [Cloudflare Pages Middleware](https://developers.cloudflare.com/pages/platform/functions/middleware/). Astro will bundle the [Astro middleware](/en/guides/middleware/) into each page. +Switching to directory mode allows you to use [pages plugins](https://developers.cloudflare.com/pages/platform/functions/plugins/) such as [Sentry](https://developers.cloudflare.com/pages/platform/functions/plugins/sentry/) or write custom code to enable logging. ```ts -// directory mode +// astro.config.mjs export default defineConfig({ adapter: cloudflare({ mode: 'directory' }), }); ``` +In `directory` mode, the adapter will compile the client-side part of your app the same way as in `advanced` mode by default, but moves the worker script into a `functions` folder in the project root. In this case, the adapter will only ever place a `[[path]].js` in that folder, allowing you to add additional plugins and pages middleware which can be checked into version control. + +To instead compile a separate bundle for each page, set the `functionPerPath` option in your Cloudflare adapter config. This option requires some manual maintenance of the `functions` folder. Files emitted by Astro will overwrite existing `functions` files with identical names, so you must choose unique file names for each file you manually add. Additionally, the adapter will never empty the `functions` folder of outdated files, so you must clean up the folder manually when you remove pages. + +```diff +import {defineConfig} from "astro/config"; +import cloudflare from '@astrojs/cloudflare'; + +export default defineConfig({ + adapter: cloudflare({ + mode: 'directory', ++ functionPerRoute: true + }) +}) +``` + +Note that this adapter does not support using [Cloudflare Pages Middleware](https://developers.cloudflare.com/pages/platform/functions/middleware/). Astro will bundle the [Astro middleware](/en/guides/middleware/) into each page. + ## Enabling Preview In order for preview to work you must install `wrangler` diff --git a/src/content/docs/en/guides/integrations-guide/deno.mdx b/src/content/docs/en/guides/integrations-guide/deno.mdx index ae640672a0455..1be7e45e9673d 100644 --- a/src/content/docs/en/guides/integrations-guide/deno.mdx +++ b/src/content/docs/en/guides/integrations-guide/deno.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/deno/ +# https://github.com/withastro/astro/tree/next/packages/integrations/deno/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/deno' description: Learn how to use the @astrojs/deno SSR adapter to deploy your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/deno/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/deno/' hasREADME: true category: adapter i18nReady: true @@ -183,6 +183,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/deno/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/deno/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/lit.mdx b/src/content/docs/en/guides/integrations-guide/lit.mdx index 6e940105e7adb..400f3e8d729f7 100644 --- a/src/content/docs/en/guides/integrations-guide/lit.mdx +++ b/src/content/docs/en/guides/integrations-guide/lit.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/lit/ +# https://github.com/withastro/astro/tree/next/packages/integrations/lit/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/lit' description: Learn how to use the @astrojs/lit framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/lit/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/lit/' hasREADME: true category: renderer i18nReady: true diff --git a/src/content/docs/en/guides/integrations-guide/markdoc.mdx b/src/content/docs/en/guides/integrations-guide/markdoc.mdx index 8eab45a82a823..501dfa3e1c78e 100644 --- a/src/content/docs/en/guides/integrations-guide/markdoc.mdx +++ b/src/content/docs/en/guides/integrations-guide/markdoc.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/markdoc/ +# https://github.com/withastro/astro/tree/next/packages/integrations/markdoc/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/markdoc' description: Learn how to use the @astrojs/markdoc integration in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/markdoc/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/markdoc/' hasREADME: true category: other i18nReady: true diff --git a/src/content/docs/en/guides/integrations-guide/mdx.mdx b/src/content/docs/en/guides/integrations-guide/mdx.mdx index 26d448b44e146..56daf48db3d3c 100644 --- a/src/content/docs/en/guides/integrations-guide/mdx.mdx +++ b/src/content/docs/en/guides/integrations-guide/mdx.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/mdx/ +# https://github.com/withastro/astro/tree/next/packages/integrations/mdx/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/mdx' description: Learn how to use the @astrojs/mdx integration in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/mdx/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/mdx/' hasREADME: true category: other i18nReady: true diff --git a/src/content/docs/en/guides/integrations-guide/netlify.mdx b/src/content/docs/en/guides/integrations-guide/netlify.mdx index bd5e6fd987ec5..b370012669c25 100644 --- a/src/content/docs/en/guides/integrations-guide/netlify.mdx +++ b/src/content/docs/en/guides/integrations-guide/netlify.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/netlify/ +# https://github.com/withastro/astro/tree/next/packages/integrations/netlify/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/netlify' description: Learn how to use the @astrojs/netlify SSR adapter to deploy your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/netlify/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/netlify/' hasREADME: true category: adapter i18nReady: true @@ -67,28 +67,11 @@ If you prefer to install the adapter manually instead, complete the following tw }); ``` -### Edge Functions - -Netlify has two serverless platforms, [Netlify Functions](https://docs.netlify.com/functions/overview/) and [Netlify Edge Functions](https://docs.netlify.com/edge-functions/overview/). With Edge Functions your code is distributed closer to your users, lowering latency. - -To deploy with Edge Functions, use `netlify/edge-functions` in the Astro config file instead of `netlify/functions`. - -```js ins={3} -// astro.config.mjs -import { defineConfig } from 'astro/config'; -import netlify from '@astrojs/netlify/edge-functions'; - -export default defineConfig({ - output: 'server', - adapter: netlify(), -}); -``` - ### Run middleware in Edge Functions When deploying to Netlify Functions, you can choose to use an Edge Function to run your Astro middleware. -To enable this, set the `build.excludeMiddleware` Astro config option to `true`: +To enable this, set the `edgeMiddleware` config option to `true`: ```js ins={9} // astro.config.mjs @@ -97,10 +80,9 @@ import netlify from '@astrojs/netlify/functions'; export default defineConfig({ output: 'server', - adapter: netlify(), - build: { - excludeMiddleware: true, - }, + adapter: netlify({ + edgeMiddleware: true, + }), }); ``` @@ -146,10 +128,9 @@ import netlify from '@astrojs/netlify/functions'; export default defineConfig({ output: 'server', - adapter: netlify(), - build: { - split: true, - }, + adapter: netlify({ + functionPerRoute: true, + }), }); ``` @@ -305,6 +286,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/netlify/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/netlify/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/node.mdx b/src/content/docs/en/guides/integrations-guide/node.mdx index bb864e82e5f2b..c4b730cd04ed7 100644 --- a/src/content/docs/en/guides/integrations-guide/node.mdx +++ b/src/content/docs/en/guides/integrations-guide/node.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/node/ +# https://github.com/withastro/astro/tree/next/packages/integrations/node/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/node' description: Learn how to use the @astrojs/node SSR adapter to deploy your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/node/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/node/' hasREADME: true category: adapter i18nReady: true @@ -172,7 +172,7 @@ For standalone mode the server handles file servering in addition to the page an You can override the host and port the standalone server runs on by passing them as environment variables at runtime: ```shell -HOST=0.0.0.0 PORT=3000 node ./dist/server/entry.mjs +HOST=0.0.0.0 PORT=4321 node ./dist/server/entry.mjs ``` #### HTTPS @@ -230,6 +230,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/node/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/node/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/partytown.mdx b/src/content/docs/en/guides/integrations-guide/partytown.mdx index b869b2bbce1ea..8e0515eed4823 100644 --- a/src/content/docs/en/guides/integrations-guide/partytown.mdx +++ b/src/content/docs/en/guides/integrations-guide/partytown.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/partytown/ +# https://github.com/withastro/astro/tree/next/packages/integrations/partytown/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/partytown' description: Learn how to use the @astrojs/partytown integration in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/partytown/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/partytown/' hasREADME: true category: other i18nReady: true @@ -158,6 +158,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/partytown/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/partytown/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/preact.mdx b/src/content/docs/en/guides/integrations-guide/preact.mdx index 4aa862623bcf9..6a34438f6c17f 100644 --- a/src/content/docs/en/guides/integrations-guide/preact.mdx +++ b/src/content/docs/en/guides/integrations-guide/preact.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/preact/ +# https://github.com/withastro/astro/tree/next/packages/integrations/preact/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/preact' description: Learn how to use the @astrojs/preact framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/preact/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/preact/' hasREADME: true category: renderer i18nReady: true @@ -128,6 +128,41 @@ Check out the [`pnpm` overrides](https://pnpm.io/package_json#pnpmoverrides) and Currently, the `compat` option only works for React libraries that export code as ESM. If an error happens during build-time, try adding the library to `vite.ssr.noExternal: ['the-react-library']` in your `astro.config.mjs` file. ::: +## Options + +### Combining multiple JSX frameworks + +When you are using multiple JSX frameworks (React, Preact, Solid) in the same project, Astro needs to determine which JSX framework-specific transformations should be used for each of your components. If you have only added one JSX framework integration to your project, no extra configuration is needed. + +Use the `include` (required) and `exclude` (optional) configuration options to specify which files belong to which framework. Provide an array of files and/or folders to `include` for each framework you are using. Wildcards may be used to include multiple file paths. + +We recommend placing common framework components in the same folder (e.g. `/components/react/` and `/components/solid/`) to make specifying your includes easier, but this is not required: + +```js +import { defineConfig } from 'astro/config'; +import preact from '@astrojs/preact'; +import react from '@astrojs/react'; +import svelte from '@astrojs/svelte'; +import vue from '@astrojs/vue'; +import solid from '@astrojs/solid-js'; + +export default defineConfig({ + // Enable many frameworks to support all different kinds of components. + // No `include` is needed if you are only using a single JSX framework! + integrations: [ + preact({ + include: ['**/preact/*'], + }), + react({ + include: ['**/react/*'], + }), + solid({ + include: ['**/solid/*'], + }), + ], +}); +``` + ## Examples * The [Astro Preact example](https://github.com/withastro/astro/tree/latest/examples/framework-preact) shows how to use an interactive Preact component in an Astro project. @@ -145,7 +180,7 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/preact/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/preact/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/prefetch.mdx b/src/content/docs/en/guides/integrations-guide/prefetch.mdx index 635f2e2e549b7..4765532aacf62 100644 --- a/src/content/docs/en/guides/integrations-guide/prefetch.mdx +++ b/src/content/docs/en/guides/integrations-guide/prefetch.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/prefetch/ +# https://github.com/withastro/astro/tree/next/packages/integrations/prefetch/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/prefetch' description: Learn how to use the @astrojs/prefetch integration in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/prefetch/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/prefetch/' hasREADME: true category: other i18nReady: true @@ -153,6 +153,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/prefetch/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/prefetch/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/react.mdx b/src/content/docs/en/guides/integrations-guide/react.mdx index 0fdf9257fbcfe..25bbe3c0c2b0b 100644 --- a/src/content/docs/en/guides/integrations-guide/react.mdx +++ b/src/content/docs/en/guides/integrations-guide/react.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/react/ +# https://github.com/withastro/astro/tree/next/packages/integrations/react/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/react' description: Learn how to use the @astrojs/react framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/react/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/react/' hasREADME: true category: renderer i18nReady: true @@ -84,6 +84,39 @@ To use your first React component in Astro, head to our [UI framework documentat ## Options +### Combining multiple JSX frameworks + +When you are using multiple JSX frameworks (React, Preact, Solid) in the same project, Astro needs to determine which JSX framework-specific transformations should be used for each of your components. If you have only added one JSX framework integration to your project, no extra configuration is needed. + +Use the `include` (required) and `exclude` (optional) configuration options to specify which files belong to which framework. Provide an array of files and/or folders to `include` for each framework you are using. Wildcards may be used to include multiple file paths. + +We recommend placing common framework components in the same folder (e.g. `/components/react/` and `/components/solid/`) to make specifying your includes easier, but this is not required: + +```js +import { defineConfig } from 'astro/config'; +import preact from '@astrojs/preact'; +import react from '@astrojs/react'; +import svelte from '@astrojs/svelte'; +import vue from '@astrojs/vue'; +import solid from '@astrojs/solid-js'; + +export default defineConfig({ + // Enable many frameworks to support all different kinds of components. + // No `include` is needed if you are only using a single JSX framework! + integrations: [ + preact({ + include: ['**/preact/*'], + }), + react({ + include: ['**/react/*'], + }), + solid({ + include: ['**/solid/*'], + }), + ], +}); +``` + ### Children parsing Children passed into a React component from an Astro component are parsed as plain strings, not React nodes. diff --git a/src/content/docs/en/guides/integrations-guide/sitemap.mdx b/src/content/docs/en/guides/integrations-guide/sitemap.mdx index 175eb9f97237f..c7328c1950f54 100644 --- a/src/content/docs/en/guides/integrations-guide/sitemap.mdx +++ b/src/content/docs/en/guides/integrations-guide/sitemap.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/sitemap/ +# https://github.com/withastro/astro/tree/next/packages/integrations/sitemap/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/sitemap' description: Learn how to use the @astrojs/sitemap integration in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/sitemap/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/sitemap/' hasREADME: true category: other i18nReady: true @@ -368,6 +368,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/sitemap/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/sitemap/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/solid-js.mdx b/src/content/docs/en/guides/integrations-guide/solid-js.mdx index 68c766632aea8..80cc51940a417 100644 --- a/src/content/docs/en/guides/integrations-guide/solid-js.mdx +++ b/src/content/docs/en/guides/integrations-guide/solid-js.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/solid/ +# https://github.com/withastro/astro/tree/next/packages/integrations/solid/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/solid-js' description: Learn how to use the @astrojs/solid-js framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/solid/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/solid/' hasREADME: true category: renderer i18nReady: true @@ -82,6 +82,41 @@ To use your first SolidJS component in Astro, head to our [UI framework document * 💧 client-side hydration options, and * 🤝 opportunities to mix and nest frameworks together +## Options + +### Combining multiple JSX frameworks + +When you are using multiple JSX frameworks (React, Preact, Solid) in the same project, Astro needs to determine which JSX framework-specific transformations should be used for each of your components. If you have only added one JSX framework integration to your project, no extra configuration is needed. + +Use the `include` (required) and `exclude` (optional) configuration options to specify which files belong to which framework. Provide an array of files and/or folders to `include` for each framework you are using. Wildcards may be used to include multiple file paths. + +We recommend placing common framework components in the same folder (e.g. `/components/react/` and `/components/solid/`) to make specifying your includes easier, but this is not required: + +```js +import { defineConfig } from 'astro/config'; +import preact from '@astrojs/preact'; +import react from '@astrojs/react'; +import svelte from '@astrojs/svelte'; +import vue from '@astrojs/vue'; +import solid from '@astrojs/solid-js'; + +export default defineConfig({ + // Enable many frameworks to support all different kinds of components. + // No `include` is needed if you are only using a single JSX framework! + integrations: [ + preact({ + include: ['**/preact/*'], + }), + react({ + include: ['**/react/*'], + }), + solid({ + include: ['**/solid/*'], + }), + ], +}); +``` + ## Troubleshooting For help, check out the `#support` channel on [Discord](https://astro.build/chat). Our friendly Support Squad members are here to help! diff --git a/src/content/docs/en/guides/integrations-guide/svelte.mdx b/src/content/docs/en/guides/integrations-guide/svelte.mdx index 56d11979eb355..e873f68d63d64 100644 --- a/src/content/docs/en/guides/integrations-guide/svelte.mdx +++ b/src/content/docs/en/guides/integrations-guide/svelte.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/svelte/ +# https://github.com/withastro/astro/tree/next/packages/integrations/svelte/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/svelte' description: Learn how to use the @astrojs/svelte framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/svelte/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/svelte/' hasREADME: true category: renderer i18nReady: true diff --git a/src/content/docs/en/guides/integrations-guide/tailwind.mdx b/src/content/docs/en/guides/integrations-guide/tailwind.mdx index 9c07a17b2e92e..3ff9a22a05ada 100644 --- a/src/content/docs/en/guides/integrations-guide/tailwind.mdx +++ b/src/content/docs/en/guides/integrations-guide/tailwind.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/tailwind/ +# https://github.com/withastro/astro/tree/next/packages/integrations/tailwind/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/tailwind' description: Learn how to use the @astrojs/tailwind integration in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/tailwind/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/tailwind/' hasREADME: true category: other i18nReady: true @@ -216,4 +216,4 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/tailwind/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/tailwind/CHANGELOG.md) for a history of changes to this integration. diff --git a/src/content/docs/en/guides/integrations-guide/vercel.mdx b/src/content/docs/en/guides/integrations-guide/vercel.mdx index c4757bc288efc..02845288d2fe3 100644 --- a/src/content/docs/en/guides/integrations-guide/vercel.mdx +++ b/src/content/docs/en/guides/integrations-guide/vercel.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/vercel/ +# https://github.com/withastro/astro/tree/next/packages/integrations/vercel/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/vercel' description: Learn how to use the @astrojs/vercel SSR adapter to deploy your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/vercel/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/vercel/' hasREADME: true category: adapter i18nReady: true @@ -71,18 +71,12 @@ If you prefer to install the adapter manually instead, complete the following tw You can deploy to different targets: -* `edge`: SSR inside an [Edge function](https://vercel.com/docs/concepts/functions/edge-functions). * `serverless`: SSR inside a [Node.js function](https://vercel.com/docs/concepts/functions/serverless-functions). * `static`: generates a static website following Vercel's output formats, redirects, etc. -:::note -deploying to the Edge has [its limitations](https://vercel.com/docs/concepts/functions/edge-functions#known-limitations). An edge function can't be more than 1 MB in size and they don't support native Node.js APIs, among others. -::: - You can change where to target by changing the import: ```js -import vercel from '@astrojs/vercel/edge'; import vercel from '@astrojs/vercel/serverless'; import vercel from '@astrojs/vercel/static'; ``` @@ -105,7 +99,7 @@ To configure this adapter, pass an object to the `vercel()` function call in `as ### analytics **Type:** `boolean`
-**Available for:** Serverless, Edge, Static
+**Available for:** Serverless, Static
**Added in:** `@astrojs/vercel@3.1.0` You can enable [Vercel Analytics](https://vercel.com/analytics) (including Web Vitals and Audiences) by setting `analytics: true`. This will inject Vercel’s tracking scripts into all your pages. @@ -126,7 +120,7 @@ export default defineConfig({ ### imagesConfig **Type:** `VercelImageConfig`
-**Available for:** Edge, Serverless, Static +**Available for:** Serverless, Static **Added in:** `@astrojs/vercel@3.3.0` Configuration options for [Vercel's Image Optimization API](https://vercel.com/docs/concepts/image-optimization). See [Vercel's image configuration documentation](https://vercel.com/docs/build-output-api/v3/configuration#images) for a complete list of supported parameters. @@ -149,7 +143,7 @@ export default defineConfig({ ### imageService **Type:** `boolean`
-**Available for:** Edge, Serverless, Static +**Available for:** Serverless, Static **Added in:** `@astrojs/vercel@3.3.0` When enabled, an [Image Service](/en/reference/image-service-reference/) powered by the Vercel Image Optimization API will be automatically configured and used in production. In development, a built-in Squoosh-based service will be used instead. @@ -190,7 +184,7 @@ import astroLogo from '../assets/logo.png'; ### includeFiles **Type:** `string[]`
-**Available for:** Edge, Serverless +**Available for:** Serverless Use this property to force files to be bundled with your function. This is helpful when you notice missing files. @@ -207,10 +201,6 @@ export default defineConfig({ }); ``` -:::note -When building for the Edge, all the dependencies get bundled in a single file to save space. **No extra file will be bundled**. So, if you *need* some file inside the function, you have to specify it in `includeFiles`. -::: - ### excludeFiles **Type:** `string[]`
@@ -242,10 +232,9 @@ import vercel from '@astrojs/vercel/serverless'; export default defineConfig({ output: 'server', - adapter: vercel(), - build: { - split: true, - }, + adapter: vercel({ + functionPerRoute: true, + }), }); ``` @@ -284,7 +273,7 @@ You can use Vercel Edge middleware to intercept a request and redirect before se The `@astrojs/vercel/serverless` adapter can automatically create the Vercel Edge middleware from an Astro middleware in your code base. -This is an opt-in feature, and the `build.excludeMiddleware` option needs to be set to `true`: +This is an opt-in feature, and the `edgeMiddleware` option needs to be set to `true`: ```js // astro.config.mjs @@ -292,10 +281,9 @@ import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; export default defineConfig({ output: 'server', - adapter: vercel(), - build: { - excludeMiddleware: true, - }, + adapter: vercel({ + edgeMiddleware: true, + }), }); ``` @@ -363,6 +351,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/vercel/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/vercel/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/vue.mdx b/src/content/docs/en/guides/integrations-guide/vue.mdx index 4013267e7c8ff..7ce4df7e0be2b 100644 --- a/src/content/docs/en/guides/integrations-guide/vue.mdx +++ b/src/content/docs/en/guides/integrations-guide/vue.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/main/packages/integrations/vue/ +# https://github.com/withastro/astro/tree/next/packages/integrations/vue/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/vue' description: Learn how to use the @astrojs/vue framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/vue/' +githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/vue/' hasREADME: true category: renderer i18nReady: true From d3d8d92d111b783f0316646b80555305d95bff09 Mon Sep 17 00:00:00 2001 From: = Date: Wed, 23 Aug 2023 12:52:09 +0100 Subject: [PATCH 2/4] Generate reference docs --- .../en/reference/configuration-reference.mdx | 92 +++++-------------- 1 file changed, 23 insertions(+), 69 deletions(-) diff --git a/src/content/docs/en/reference/configuration-reference.mdx b/src/content/docs/en/reference/configuration-reference.mdx index 3fffc314686fe..acc60bf975943 100644 --- a/src/content/docs/en/reference/configuration-reference.mdx +++ b/src/content/docs/en/reference/configuration-reference.mdx @@ -197,15 +197,15 @@ Your final, deployed URL. Astro uses this full URL to generate your sitemap and

**Type:** `boolean`
-**Default:** `false` +**Default:** `true`

-This is an option to minify your HTML output and reduce the size of your HTML files. When enabled, Astro removes all whitespace from your HTML, including line breaks, from `.astro` components. This occurs both in development mode and in the final build. -To enable this, set the `compressHTML` flag to `true`. +This is an option to minify your HTML output and reduce the size of your HTML files. By default, Astro removes all whitespace from your HTML, including line breaks, from `.astro` components. This occurs both in development mode and in the final build. +To disable HTML compression, set the `compressHTML` flag to `false`. ```js { - compressHTML: true + compressHTML: false } ``` @@ -229,12 +229,7 @@ In the example below, `astro dev` will start your server at `/docs`. When using this option, all of your static asset imports and URLs should add the base as a prefix. You can access this value via `import.meta.env.BASE_URL`. -By default, the value of `import.meta.env.BASE_URL` includes a trailing slash. If you have the [`trailingSlash`](/en/reference/configuration-reference/#trailingslash) option set to `'never'`, you will need to add it manually in your static asset imports and URLs. - -```astro -About - -``` +The value of `import.meta.env.BASE_URL` respects your `trailingSlash` config and will include a trailing slash if you explicitly include one or if `trailingSlash: "always"` is set. If `trailingSlash: "never"` is set, `BASE_URL` will not include a trailing slash, even if `base` includes one. ### trailingSlash @@ -268,17 +263,19 @@ You can also set this if you prefer to be more strict yourself, so that URLs wit

-**Type:** `'where' | 'class'`
-**Default:** `'where'`
+**Type:** `'where' | 'class' | 'attribute'`
+**Default:** `'attribute'`

Specify the strategy used for scoping styles within Astro components. Choose from: - - `'where'` - Use `:where` selectors, causing no specifity increase. - - `'class'` - Use class-based selectors, causing a +1 specifity increase. + - `'where'` - Use `:where` selectors, causing no specifity increase. + - `'class'` - Use class-based selectors, causing a +1 specifity increase. + - `'attribute'` - Use `data-` attributes, causing no specifity increase. Using `'class'` is helpful when you want to ensure that element selectors within an Astro component override global style defaults (e.g. from a global stylesheet). Using `'where'` gives you more control over specifity, but requires that you use higher-specifity selectors, layers, and other tools to control which selectors are applied. +Using 'attribute' is useful when you are manipulating the `class` attribute of elements and need to avoid conflicts between your own styling logic and Astro's application of styles. ### adapter @@ -508,7 +505,7 @@ configuration files for redirects and do not need/want HTML based redirects.

**Type:** `'always' | 'auto' | 'never'`
-**Default:** `never`
+**Default:** `auto`

@@ -520,7 +517,7 @@ Control whether project styles are sent to the browser in a separate css file or ```js { build: { - inlineStylesheets: `auto`, + inlineStylesheets: `never`, }, } ``` @@ -531,24 +528,12 @@ Control whether project styles are sent to the browser in a separate css file or

**Type:** `boolean`
-**Default:** `false`
- +**Default:** `false`

-Defines how the SSR code should be bundled when built. +The build config option `build.split` has been replaced by the adapter configuration option [`functionPerRoute`](/en/reference/adapter-reference/#functionperroute). -When `split` is `true`, Astro will emit a file for each page. -Each file emitted will render only one page. The pages will be emitted -inside a `dist/pages/` directory, and the emitted files will keep the same file paths -of the `src/pages` directory. - -```js -{ - build: { - split: true - } -} -``` +Please see your [SSR adapter's documentation](/en/guides/integrations-guide/#official-integrations) for using `functionPerRoute` to define how your SSR code is bundled. ### build.excludeMiddleware @@ -556,21 +541,12 @@ of the `src/pages` directory.

**Type:** `boolean`
-**Default:** `false`
- +**Default:** `false`

-Defines whether or not any SSR middleware code will be bundled when built. +The build config option `build.excludeMiddleware` has been replaced by the adapter configuration option [`edgeMiddleware`](/en/reference/adapter-reference/#edgemiddleware). -When enabled, middleware code is not bundled and imported by all pages during the build. To instead execute and import middleware code manually, set `build.excludeMiddleware: true`: - -```js -{ - build: { - excludeMiddleware: true - } -} -``` +Please see your [SSR adapter's documentation](/en/guides/integrations-guide/#official-integrations) for using `edgeMiddleware` to define whether or not any SSR middleware code will be bundled when built. ## Server Options @@ -588,7 +564,7 @@ To set different configuration based on the command run ("dev", "preview") a fun ```js { // Example: Use the function syntax to customize based on command - server: ({ command }) => ({ port: command === 'dev' ? 3000 : 4000 }) + server: ({ command }) => ({ port: command === 'dev' ? 4321 : 4000 }) } ``` @@ -612,7 +588,7 @@ Set which network IP addresses the server should listen on (i.e. non-localhost I

**Type:** `number`
-**Default:** `3000` +**Default:** `4321`

Set which port the server should listen on. @@ -645,7 +621,7 @@ Set custom HTTP response headers to be sent in `astro dev` and `astro preview`.

**Type:** `Object`
-**Default:** `{entrypoint: 'astro/assets/services/squoosh', config?: {}}`
+**Default:** `{entrypoint: 'astro/assets/services/sharp', config?: {}}`

@@ -884,7 +860,7 @@ Pass options to [remark-rehype](https://github.com/remarkjs/remark-rehype#api). ## Integrations -Extend Astro with custom integrations. Integrations are your one-stop-shop for adding framework support (like Solid.js), new features (like sitemaps), and new libraries (like Partytown and Turbolinks). +Extend Astro with custom integrations. Integrations are your one-stop-shop for adding framework support (like Solid.js), new features (like sitemaps), and new libraries (like Partytown). Read our [Integrations Guide](/en/guides/integrations-guide/) for help getting started with Astro Integrations. @@ -936,28 +912,6 @@ in the latest version, so that you can continue to upgrade and take advantage of Astro offers experimental flags to give users early access to new features. These flags are not guaranteed to be stable. -### experimental.assets - -

- -**Type:** `boolean`
-**Default:** `false`
- -

- -Enable experimental support for optimizing and resizing images. With this enabled, a new `astro:assets` module will be exposed. - -To enable this feature, set `experimental.assets` to `true` in your Astro config: - -```js -{ - experimental: { - assets: true, - }, -} -``` - - ### experimental.viewTransitions

From f2416e130ae6b5a5155dc4d15cf0cde5412e3fce Mon Sep 17 00:00:00 2001 From: = Date: Wed, 23 Aug 2023 12:52:33 +0100 Subject: [PATCH 3/4] Generate error reference docs --- .../docs/en/reference/error-reference.mdx | 1 + .../errors/expected-image-options.mdx | 2 +- .../en/reference/errors/expected-image.mdx | 2 +- .../en/reference/errors/image-missing-alt.mdx | 6 +-- .../errors/local-image-used-wrongly.mdx | 2 +- .../reference/errors/locals-not-an-object.mdx | 2 +- .../errors/markdown-image-not-found.mdx | 2 +- .../middleware-no-data-or-next-called.mdx | 2 +- .../errors/middleware-not-aresponse.mdx | 2 +- .../errors/missing-image-dimension.mdx | 4 +- .../en/reference/errors/missing-sharp.mdx | 37 +++++++++++++++++++ .../errors/static-redirect-not-available.mdx | 2 +- .../errors/unsupported-image-format.mdx | 4 +- 13 files changed, 53 insertions(+), 15 deletions(-) create mode 100644 src/content/docs/en/reference/errors/missing-sharp.mdx diff --git a/src/content/docs/en/reference/error-reference.mdx b/src/content/docs/en/reference/error-reference.mdx index 029f00b2346f2..02b2b1e9124f6 100644 --- a/src/content/docs/en/reference/error-reference.mdx +++ b/src/content/docs/en/reference/error-reference.mdx @@ -57,6 +57,7 @@ The following reference is a complete list of the errors you may encounter while - [**AstroGlobNoMatch**](/en/reference/errors/astro-glob-no-match/)
Astro.glob() did not match any files. - [**RedirectWithNoLocation**](/en/reference/errors/redirect-with-no-location/)
A redirect must be given a location with the `Location` header. - [**InvalidDynamicRoute**](/en/reference/errors/invalid-dynamic-route/)
Invalid dynamic route. +- [**MissingSharp**](/en/reference/errors/missing-sharp/)
Could not find Sharp. - [**UnknownViteError**](/en/reference/errors/unknown-vite-error/)
Unknown Vite Error. - [**FailedToLoadModuleSSR**](/en/reference/errors/failed-to-load-module-ssr/)
Could not import file. - [**InvalidGlob**](/en/reference/errors/invalid-glob/)
Invalid glob pattern. diff --git a/src/content/docs/en/reference/errors/expected-image-options.mdx b/src/content/docs/en/reference/errors/expected-image-options.mdx index 10557b0aac826..adf440185d160 100644 --- a/src/content/docs/en/reference/errors/expected-image-options.mdx +++ b/src/content/docs/en/reference/errors/expected-image-options.mdx @@ -28,6 +28,6 @@ const optimizedImage = await getImage({src: myImage, width: 300, height: 300}); In most cases, this error happens because parameters were passed directly instead of inside an object. **See Also:** -- [Assets (Experimental)](/en/guides/assets/) +- [Images](/en/guides/images/) diff --git a/src/content/docs/en/reference/errors/expected-image.mdx b/src/content/docs/en/reference/errors/expected-image.mdx index 6060dae8ce657..bd8e779190a6c 100644 --- a/src/content/docs/en/reference/errors/expected-image.mdx +++ b/src/content/docs/en/reference/errors/expected-image.mdx @@ -31,6 +31,6 @@ import myImage from "../assets/my_image.png"; In most cases, this error happens when the value passed to `src` is undefined. **See Also:** -- [Assets (Experimental)](/en/guides/assets/) +- [Images](/en/guides/images/) diff --git a/src/content/docs/en/reference/errors/image-missing-alt.mdx b/src/content/docs/en/reference/errors/image-missing-alt.mdx index 2ea961340f5f2..3d01cd92a9979 100644 --- a/src/content/docs/en/reference/errors/image-missing-alt.mdx +++ b/src/content/docs/en/reference/errors/image-missing-alt.mdx @@ -21,8 +21,8 @@ The `alt` property allows you to provide descriptive alt text to users of screen If the image is merely decorative (i.e. doesn’t contribute to the understanding of the page), set `alt=""` so that screen readers know to ignore the image. **See Also:** -- [Assets (Experimental)](/en/guides/assets/) -- [Image component](/en/guides/assets/#image--astroassets) --  [Image component#alt](/en/guides/assets/#alt-required) +- [Images](/en/guides/images/) +- [Image component](/en/guides/images/#image--astroassets) +-  [Image component#alt](/en/guides/images/#alt-required) diff --git a/src/content/docs/en/reference/errors/local-image-used-wrongly.mdx b/src/content/docs/en/reference/errors/local-image-used-wrongly.mdx index 1f697ac9ec76a..99574a8cc1ff2 100644 --- a/src/content/docs/en/reference/errors/local-image-used-wrongly.mdx +++ b/src/content/docs/en/reference/errors/local-image-used-wrongly.mdx @@ -32,6 +32,6 @@ import myImage from "../my_image.png"; ``` **See Also:** -- [Assets (Experimental)](/en/guides/assets/) +- [Images](/en/guides/images/) diff --git a/src/content/docs/en/reference/errors/locals-not-an-object.mdx b/src/content/docs/en/reference/errors/locals-not-an-object.mdx index d503a11695d32..c4ca3a1992415 100644 --- a/src/content/docs/en/reference/errors/locals-not-an-object.mdx +++ b/src/content/docs/en/reference/errors/locals-not-an-object.mdx @@ -20,7 +20,7 @@ Thrown in development mode when `locals` is overwritten with something that is n For example: ```ts -import {defineMiddleware} from "astro/middleware"; +import {defineMiddleware} from "astro:middleware"; export const onRequest = defineMiddleware((context, next) => { context.locals = 1541; return next(); diff --git a/src/content/docs/en/reference/errors/markdown-image-not-found.mdx b/src/content/docs/en/reference/errors/markdown-image-not-found.mdx index 1450d5cd79023..6feeea6e2f75d 100644 --- a/src/content/docs/en/reference/errors/markdown-image-not-found.mdx +++ b/src/content/docs/en/reference/errors/markdown-image-not-found.mdx @@ -21,6 +21,6 @@ Astro could not find an image you included in your Markdown content. Usually, th Images in Markdown are relative to the current file. To refer to an image that is located in the same folder as the `.md` file, the path should start with `./` **See Also:** -- [Assets (Experimental)](/en/guides/assets/) +- [Images](/en/guides/images/) diff --git a/src/content/docs/en/reference/errors/middleware-no-data-or-next-called.mdx b/src/content/docs/en/reference/errors/middleware-no-data-or-next-called.mdx index ba8e6ab5d6f9c..a469882ba3d49 100644 --- a/src/content/docs/en/reference/errors/middleware-no-data-or-next-called.mdx +++ b/src/content/docs/en/reference/errors/middleware-no-data-or-next-called.mdx @@ -20,7 +20,7 @@ Thrown when the middleware does not return any data or call the `next` function. For example: ```ts -import {defineMiddleware} from "astro/middleware"; +import {defineMiddleware} from "astro:middleware"; export const onRequest = defineMiddleware((context, _) => { // doesn't return anything or call `next` context.locals.someData = false; diff --git a/src/content/docs/en/reference/errors/middleware-not-aresponse.mdx b/src/content/docs/en/reference/errors/middleware-not-aresponse.mdx index 92d6caac3f08f..a3a19a357841d 100644 --- a/src/content/docs/en/reference/errors/middleware-not-aresponse.mdx +++ b/src/content/docs/en/reference/errors/middleware-not-aresponse.mdx @@ -20,7 +20,7 @@ Thrown in development mode when middleware returns something that is not a `Resp For example: ```ts -import {defineMiddleware} from "astro/middleware"; +import {defineMiddleware} from "astro:middleware"; export const onRequest = defineMiddleware(() => { return "string" }); diff --git a/src/content/docs/en/reference/errors/missing-image-dimension.mdx b/src/content/docs/en/reference/errors/missing-image-dimension.mdx index f960c46d62260..82ef85cdfa59c 100644 --- a/src/content/docs/en/reference/errors/missing-image-dimension.mdx +++ b/src/content/docs/en/reference/errors/missing-image-dimension.mdx @@ -21,7 +21,7 @@ For remote images, `width` and `height` cannot be inferred from the original fil If your image is inside your `src` folder, you probably meant to import it instead. See [the Imports guide for more information](/en/guides/imports/#other-assets). **See Also:** -- [Assets (Experimental)](/en/guides/assets/) -- [Image component#width-and-height](/en/guides/assets/#width-and-height) +- [Images](/en/guides/images/) +- [Image component#width-and-height-required](/en/guides/images/#width-and-height-required-for-public-and-remote-images) diff --git a/src/content/docs/en/reference/errors/missing-sharp.mdx b/src/content/docs/en/reference/errors/missing-sharp.mdx new file mode 100644 index 0000000000000..b4f82b5fd16e6 --- /dev/null +++ b/src/content/docs/en/reference/errors/missing-sharp.mdx @@ -0,0 +1,37 @@ +--- +# NOTE: This file is auto-generated from 'scripts/error-docgen.mjs' +# Do not make edits to it directly, they will be overwritten. +# Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts +# Translators, please remove this note and the component. + +title: Could not find Sharp. +i18nReady: true +githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts +--- +import DontEditWarning from '~/components/DontEditWarning.astro' + + + + +> **MissingSharp**: Could not find Sharp. Please install Sharp (`sharp`) manually into your project. + +## What went wrong? +Sharp is the default image service used for `astro:assets`. When using a [strict package manager](https://pnpm.io/pnpm-vs-npm#npms-flat-tree) like pnpm, Sharp must be installed manually into your project in order to use image processing. + +If you are not using `astro:assets` for image processing, and do not wish to install Sharp, you can configure the following passthrough image service that does no processing: + +```js +import { defineConfig, passthroughImageService } from "astro/config"; +export default defineConfig({ + image: { + service: passthroughImageService(), + }, +}); +``` + +**See Also:** +- [Default Image Service](/en/guides/images/#default-image-service) +- [Image Component](/en/guides/images/#image--astroassets) +- [Image Services API](/en/reference/image-service-reference/) + + diff --git a/src/content/docs/en/reference/errors/static-redirect-not-available.mdx b/src/content/docs/en/reference/errors/static-redirect-not-available.mdx index b30085753a7aa..33cea00ba861d 100644 --- a/src/content/docs/en/reference/errors/static-redirect-not-available.mdx +++ b/src/content/docs/en/reference/errors/static-redirect-not-available.mdx @@ -14,7 +14,7 @@ import DontEditWarning from '~/components/DontEditWarning.astro' :::caution[Deprecated] -since version 2.6 +Deprecated since version 2.6. ::: > **StaticRedirectNotAvailable**: Redirects are only available when using `output: 'server'` or `output: 'hybrid'`. Update your Astro config if you need SSR features. diff --git a/src/content/docs/en/reference/errors/unsupported-image-format.mdx b/src/content/docs/en/reference/errors/unsupported-image-format.mdx index 0d32e659dedfb..3c9632ef66bed 100644 --- a/src/content/docs/en/reference/errors/unsupported-image-format.mdx +++ b/src/content/docs/en/reference/errors/unsupported-image-format.mdx @@ -18,10 +18,10 @@ import DontEditWarning from '~/components/DontEditWarning.astro' ## What went wrong? The built-in image services do not currently support optimizing all image formats. -For unsupported formats such as SVGs and GIFs, you may be able to use an `img` tag directly: +For unsupported formats such as GIFs, you may be able to use an `img` tag directly: ```astro --- -import rocket from '../assets/images/rocket.svg'; +import rocket from '../assets/images/rocket.gif'; --- A rocketship in space. From 32e088e5a9944292da091a7afc3003bf79a8588e Mon Sep 17 00:00:00 2001 From: = Date: Wed, 23 Aug 2023 13:36:11 +0100 Subject: [PATCH 4/4] Revert branch name change --- src/content/docs/en/guides/integrations-guide/alpinejs.mdx | 6 +++--- .../docs/en/guides/integrations-guide/cloudflare.mdx | 4 ++-- src/content/docs/en/guides/integrations-guide/deno.mdx | 6 +++--- src/content/docs/en/guides/integrations-guide/lit.mdx | 4 ++-- src/content/docs/en/guides/integrations-guide/markdoc.mdx | 4 ++-- src/content/docs/en/guides/integrations-guide/mdx.mdx | 4 ++-- src/content/docs/en/guides/integrations-guide/netlify.mdx | 6 +++--- src/content/docs/en/guides/integrations-guide/node.mdx | 6 +++--- src/content/docs/en/guides/integrations-guide/partytown.mdx | 6 +++--- src/content/docs/en/guides/integrations-guide/preact.mdx | 6 +++--- src/content/docs/en/guides/integrations-guide/prefetch.mdx | 6 +++--- src/content/docs/en/guides/integrations-guide/react.mdx | 4 ++-- src/content/docs/en/guides/integrations-guide/sitemap.mdx | 6 +++--- src/content/docs/en/guides/integrations-guide/solid-js.mdx | 4 ++-- src/content/docs/en/guides/integrations-guide/svelte.mdx | 4 ++-- src/content/docs/en/guides/integrations-guide/tailwind.mdx | 6 +++--- src/content/docs/en/guides/integrations-guide/vercel.mdx | 6 +++--- src/content/docs/en/guides/integrations-guide/vue.mdx | 4 ++-- 18 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/content/docs/en/guides/integrations-guide/alpinejs.mdx b/src/content/docs/en/guides/integrations-guide/alpinejs.mdx index c2bd9d3b6b225..665a9e465d082 100644 --- a/src/content/docs/en/guides/integrations-guide/alpinejs.mdx +++ b/src/content/docs/en/guides/integrations-guide/alpinejs.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/alpinejs/ +# https://github.com/withastro/astro/tree/main/packages/integrations/alpinejs/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/alpinejs' description: Learn how to use the @astrojs/alpinejs framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/alpinejs/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/alpinejs/' hasREADME: true category: renderer i18nReady: true @@ -112,7 +112,7 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/alpinejs/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/alpinejs/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx index 95a18062b4729..13f75533bcdb3 100644 --- a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx +++ b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/cloudflare/ +# https://github.com/withastro/astro/tree/main/packages/integrations/cloudflare/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/cloudflare' description: Learn how to use the @astrojs/cloudflare SSR adapter to deploy your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/cloudflare/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/cloudflare/' hasREADME: true category: adapter i18nReady: true diff --git a/src/content/docs/en/guides/integrations-guide/deno.mdx b/src/content/docs/en/guides/integrations-guide/deno.mdx index 1be7e45e9673d..ae640672a0455 100644 --- a/src/content/docs/en/guides/integrations-guide/deno.mdx +++ b/src/content/docs/en/guides/integrations-guide/deno.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/deno/ +# https://github.com/withastro/astro/tree/main/packages/integrations/deno/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/deno' description: Learn how to use the @astrojs/deno SSR adapter to deploy your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/deno/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/deno/' hasREADME: true category: adapter i18nReady: true @@ -183,6 +183,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/deno/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/deno/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/lit.mdx b/src/content/docs/en/guides/integrations-guide/lit.mdx index 400f3e8d729f7..6e940105e7adb 100644 --- a/src/content/docs/en/guides/integrations-guide/lit.mdx +++ b/src/content/docs/en/guides/integrations-guide/lit.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/lit/ +# https://github.com/withastro/astro/tree/main/packages/integrations/lit/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/lit' description: Learn how to use the @astrojs/lit framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/lit/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/lit/' hasREADME: true category: renderer i18nReady: true diff --git a/src/content/docs/en/guides/integrations-guide/markdoc.mdx b/src/content/docs/en/guides/integrations-guide/markdoc.mdx index 501dfa3e1c78e..8eab45a82a823 100644 --- a/src/content/docs/en/guides/integrations-guide/markdoc.mdx +++ b/src/content/docs/en/guides/integrations-guide/markdoc.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/markdoc/ +# https://github.com/withastro/astro/tree/main/packages/integrations/markdoc/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/markdoc' description: Learn how to use the @astrojs/markdoc integration in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/markdoc/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/markdoc/' hasREADME: true category: other i18nReady: true diff --git a/src/content/docs/en/guides/integrations-guide/mdx.mdx b/src/content/docs/en/guides/integrations-guide/mdx.mdx index 56daf48db3d3c..26d448b44e146 100644 --- a/src/content/docs/en/guides/integrations-guide/mdx.mdx +++ b/src/content/docs/en/guides/integrations-guide/mdx.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/mdx/ +# https://github.com/withastro/astro/tree/main/packages/integrations/mdx/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/mdx' description: Learn how to use the @astrojs/mdx integration in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/mdx/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/mdx/' hasREADME: true category: other i18nReady: true diff --git a/src/content/docs/en/guides/integrations-guide/netlify.mdx b/src/content/docs/en/guides/integrations-guide/netlify.mdx index b370012669c25..ab54a7be6c9ea 100644 --- a/src/content/docs/en/guides/integrations-guide/netlify.mdx +++ b/src/content/docs/en/guides/integrations-guide/netlify.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/netlify/ +# https://github.com/withastro/astro/tree/main/packages/integrations/netlify/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/netlify' description: Learn how to use the @astrojs/netlify SSR adapter to deploy your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/netlify/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/netlify/' hasREADME: true category: adapter i18nReady: true @@ -286,6 +286,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/netlify/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/netlify/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/node.mdx b/src/content/docs/en/guides/integrations-guide/node.mdx index c4b730cd04ed7..840eb4ddf37bd 100644 --- a/src/content/docs/en/guides/integrations-guide/node.mdx +++ b/src/content/docs/en/guides/integrations-guide/node.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/node/ +# https://github.com/withastro/astro/tree/main/packages/integrations/node/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/node' description: Learn how to use the @astrojs/node SSR adapter to deploy your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/node/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/node/' hasREADME: true category: adapter i18nReady: true @@ -230,6 +230,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/node/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/node/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/partytown.mdx b/src/content/docs/en/guides/integrations-guide/partytown.mdx index 8e0515eed4823..b869b2bbce1ea 100644 --- a/src/content/docs/en/guides/integrations-guide/partytown.mdx +++ b/src/content/docs/en/guides/integrations-guide/partytown.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/partytown/ +# https://github.com/withastro/astro/tree/main/packages/integrations/partytown/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/partytown' description: Learn how to use the @astrojs/partytown integration in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/partytown/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/partytown/' hasREADME: true category: other i18nReady: true @@ -158,6 +158,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/partytown/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/partytown/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/preact.mdx b/src/content/docs/en/guides/integrations-guide/preact.mdx index 6a34438f6c17f..3d02d9e0f22cf 100644 --- a/src/content/docs/en/guides/integrations-guide/preact.mdx +++ b/src/content/docs/en/guides/integrations-guide/preact.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/preact/ +# https://github.com/withastro/astro/tree/main/packages/integrations/preact/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/preact' description: Learn how to use the @astrojs/preact framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/preact/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/preact/' hasREADME: true category: renderer i18nReady: true @@ -180,7 +180,7 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/preact/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/preact/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/prefetch.mdx b/src/content/docs/en/guides/integrations-guide/prefetch.mdx index 4765532aacf62..635f2e2e549b7 100644 --- a/src/content/docs/en/guides/integrations-guide/prefetch.mdx +++ b/src/content/docs/en/guides/integrations-guide/prefetch.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/prefetch/ +# https://github.com/withastro/astro/tree/main/packages/integrations/prefetch/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/prefetch' description: Learn how to use the @astrojs/prefetch integration in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/prefetch/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/prefetch/' hasREADME: true category: other i18nReady: true @@ -153,6 +153,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/prefetch/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/prefetch/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/react.mdx b/src/content/docs/en/guides/integrations-guide/react.mdx index 25bbe3c0c2b0b..11f07bb6446fc 100644 --- a/src/content/docs/en/guides/integrations-guide/react.mdx +++ b/src/content/docs/en/guides/integrations-guide/react.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/react/ +# https://github.com/withastro/astro/tree/main/packages/integrations/react/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/react' description: Learn how to use the @astrojs/react framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/react/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/react/' hasREADME: true category: renderer i18nReady: true diff --git a/src/content/docs/en/guides/integrations-guide/sitemap.mdx b/src/content/docs/en/guides/integrations-guide/sitemap.mdx index c7328c1950f54..175eb9f97237f 100644 --- a/src/content/docs/en/guides/integrations-guide/sitemap.mdx +++ b/src/content/docs/en/guides/integrations-guide/sitemap.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/sitemap/ +# https://github.com/withastro/astro/tree/main/packages/integrations/sitemap/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/sitemap' description: Learn how to use the @astrojs/sitemap integration in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/sitemap/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/sitemap/' hasREADME: true category: other i18nReady: true @@ -368,6 +368,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/sitemap/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/sitemap/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/solid-js.mdx b/src/content/docs/en/guides/integrations-guide/solid-js.mdx index 80cc51940a417..b4d9baf047a2a 100644 --- a/src/content/docs/en/guides/integrations-guide/solid-js.mdx +++ b/src/content/docs/en/guides/integrations-guide/solid-js.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/solid/ +# https://github.com/withastro/astro/tree/main/packages/integrations/solid/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/solid-js' description: Learn how to use the @astrojs/solid-js framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/solid/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/solid/' hasREADME: true category: renderer i18nReady: true diff --git a/src/content/docs/en/guides/integrations-guide/svelte.mdx b/src/content/docs/en/guides/integrations-guide/svelte.mdx index e873f68d63d64..56d11979eb355 100644 --- a/src/content/docs/en/guides/integrations-guide/svelte.mdx +++ b/src/content/docs/en/guides/integrations-guide/svelte.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/svelte/ +# https://github.com/withastro/astro/tree/main/packages/integrations/svelte/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/svelte' description: Learn how to use the @astrojs/svelte framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/svelte/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/svelte/' hasREADME: true category: renderer i18nReady: true diff --git a/src/content/docs/en/guides/integrations-guide/tailwind.mdx b/src/content/docs/en/guides/integrations-guide/tailwind.mdx index 3ff9a22a05ada..9c07a17b2e92e 100644 --- a/src/content/docs/en/guides/integrations-guide/tailwind.mdx +++ b/src/content/docs/en/guides/integrations-guide/tailwind.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/tailwind/ +# https://github.com/withastro/astro/tree/main/packages/integrations/tailwind/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/tailwind' description: Learn how to use the @astrojs/tailwind integration in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/tailwind/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/tailwind/' hasREADME: true category: other i18nReady: true @@ -216,4 +216,4 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/tailwind/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/tailwind/CHANGELOG.md) for a history of changes to this integration. diff --git a/src/content/docs/en/guides/integrations-guide/vercel.mdx b/src/content/docs/en/guides/integrations-guide/vercel.mdx index 02845288d2fe3..0a198045c8634 100644 --- a/src/content/docs/en/guides/integrations-guide/vercel.mdx +++ b/src/content/docs/en/guides/integrations-guide/vercel.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/vercel/ +# https://github.com/withastro/astro/tree/main/packages/integrations/vercel/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/vercel' description: Learn how to use the @astrojs/vercel SSR adapter to deploy your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/vercel/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/vercel/' hasREADME: true category: adapter i18nReady: true @@ -351,6 +351,6 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog -See [CHANGELOG.md](https://github.com/withastro/astro/tree/next/packages/integrations/vercel/CHANGELOG.md) for a history of changes to this integration. +See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/vercel/CHANGELOG.md) for a history of changes to this integration. [astro-integration]: /en/guides/integrations-guide/ diff --git a/src/content/docs/en/guides/integrations-guide/vue.mdx b/src/content/docs/en/guides/integrations-guide/vue.mdx index 7ce4df7e0be2b..4013267e7c8ff 100644 --- a/src/content/docs/en/guides/integrations-guide/vue.mdx +++ b/src/content/docs/en/guides/integrations-guide/vue.mdx @@ -3,14 +3,14 @@ # and pulls content directly from the package’s README. # DO NOT MAKE EDITS TO THIS FILE DIRECTLY, THEY WILL BE OVERWRITTEN! # For corrections, please edit the package README at -# https://github.com/withastro/astro/tree/next/packages/integrations/vue/ +# https://github.com/withastro/astro/tree/main/packages/integrations/vue/ # # TRANSLATORS: please remove this note and the component. type: integration title: '@astrojs/vue' description: Learn how to use the @astrojs/vue framework integration to extend component support in your Astro project. -githubURL: 'https://github.com/withastro/astro/tree/next/packages/integrations/vue/' +githubURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/vue/' hasREADME: true category: renderer i18nReady: true