diff --git a/.changeset/calm-balloons-kneel.md b/.changeset/calm-balloons-kneel.md new file mode 100644 index 000000000..d374c4ff2 --- /dev/null +++ b/.changeset/calm-balloons-kneel.md @@ -0,0 +1,20 @@ +--- +'@astrojs/cloudflare': patch +'@astrojs/deno': patch +'@astrojs/image': patch +'@astrojs/mdx': patch +'@astrojs/netlify': patch +'@astrojs/node': patch +'@astrojs/partytown': patch +'@astrojs/preact': patch +'@astrojs/prefetch': patch +'@astrojs/react': patch +'@astrojs/sitemap': patch +'@astrojs/solid-js': patch +'@astrojs/svelte': patch +'@astrojs/tailwind': patch +'@astrojs/vercel': patch +'@astrojs/vue': patch +--- + +Integration README fixes diff --git a/packages/integrations/cloudflare/README.md b/packages/integrations/cloudflare/README.md index 898949a5f..3417149b8 100644 --- a/packages/integrations/cloudflare/README.md +++ b/packages/integrations/cloudflare/README.md @@ -2,7 +2,7 @@ An SSR adapter for use with Cloudflare Pages Functions targets. Write your code in Astro/Node and deploy to Cloudflare Pages. -In your astro.config.mjs use: +In your `astro.config.mjs` use: ```js import { defineConfig } from 'astro/config'; diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index f9b16db21..dcfbfe77e 100644 --- a/packages/integrations/cloudflare/package.json +++ b/packages/integrations/cloudflare/package.json @@ -15,7 +15,7 @@ "astro-adapter" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/cloudflare/", "exports": { ".": "./dist/index.js", "./server.js": "./dist/server.js", diff --git a/packages/integrations/deno/README.md b/packages/integrations/deno/README.md index 2b9b4716c..bc8dfe8f6 100644 --- a/packages/integrations/deno/README.md +++ b/packages/integrations/deno/README.md @@ -22,13 +22,14 @@ If you wish to [use server-side rendering (SSR)](https://docs.astro.build/en/gui ## Installation First, install the `@astrojs/deno` package using your package manager. If you're using npm or aren't sure, run this in the terminal: + ```sh npm install @astrojs/deno ``` Then, install this adapter in your `astro.config.*` file using the `adapter` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import { defineConfig } from 'astro/config'; @@ -51,7 +52,8 @@ import './dist/entry.mjs'; See the `start` option below for how you can have more control over starting the Astro server. You can also run the script directly using deno: -``` + +```sh deno run --allow-net --allow-read --allow-env ./dist/server/entry.mjs ``` @@ -60,7 +62,8 @@ deno run --allow-net --allow-read --allow-env ./dist/server/entry.mjs To configure this adapter, pass an object to the `deno()` function call in `astro.config.mjs`. -__astro.config.mjs__ +__`astro.config.mjs`__ + ```js import { defineConfig } from 'astro/config'; import deno from '@astrojs/deno'; @@ -74,8 +77,6 @@ export default defineConfig({
start - -
This adapter automatically starts a server when it is imported. You can turn this off with the `start` option: @@ -106,8 +107,6 @@ export default defineConfig({
port and hostname - -
You can set the port (default: `8085`) and hostname (default: `0.0.0.0`) for the deno server to use. If `start` is false, this has no effect; your own server must configure the port and hostname. @@ -130,10 +129,16 @@ The [Astro Deno](https://github.com/withastro/astro/tree/main/examples/deno) exa ## Troubleshooting +For help, check out the `#support-threads` channel on [Discord](https://astro.build/chat). Our friendly Support Squad members are here to help! + +You can also check our [Astro Integration Documentation][astro-integration] for more on integrations. + ## Contributing This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! ## Changelog +See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this integration. + [astro-integration]: https://docs.astro.build/en/guides/integrations-guide/ diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json index c7670d341..04b2ef7dc 100644 --- a/packages/integrations/deno/package.json +++ b/packages/integrations/deno/package.json @@ -15,7 +15,7 @@ "astro-adapter" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/deno/", "exports": { ".": "./dist/index.js", "./server.js": "./dist/server.js", diff --git a/packages/integrations/image/README.md b/packages/integrations/image/README.md index 7f7a67daa..b14587d71 100644 --- a/packages/integrations/image/README.md +++ b/packages/integrations/image/README.md @@ -23,7 +23,6 @@ This integration provides `` and `` components as well as a ba
Quick Install -
The experimental `astro add` command-line tool automates the installation for you. Run one of the following commands in a new terminal window. (If you aren't sure which package manager you're using, run the first command.) Then, follow the prompts, and type "y" in the terminal (meaning "yes") for each one. @@ -44,15 +43,13 @@ Because this command is new, it might not properly set things up. If that happen
Manual Install -
- First, install the `@astrojs/image` package using your package manager. If you're using npm or aren't sure, run this in the terminal: ```sh npm install @astrojs/image ``` Then, apply this integration to your `astro.config.*` file using the `integrations` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import image from '@astrojs/image'; @@ -81,8 +78,6 @@ There are currently no other configuration options for the `@astrojs/image` inte
config.serviceEntryPoint -
- The `serviceEntryPoint` should resolve to the image service installed from NPM. The default entry point is `@astrojs/image/sharp`, which resolves to the entry point exported from this integration's `package.json`. ```js @@ -103,8 +98,6 @@ export default {
Local images -
- Image files in your project's `src` directory can be imported in frontmatter and passed directly to the `` component. All other properties are optional and will default to the original image file's properties if not provided. ```html @@ -133,8 +126,6 @@ import heroImage from '../assets/hero.png';
Remote images -
- Remote images can be transformed with the `` component. The `` component needs to know the final dimensions for the `` element to avoid content layout shifts. For remote images, this means you must either provide `width` and `height`, or one of the dimensions plus the required `aspectRatio`. ```html @@ -158,8 +149,6 @@ const imageUrl = 'https://www.google.com/images/branding/googlelogo/2x/googlelog
Images in markdown -
- The `` component can also be used to optimize images in markdown pages. For local images imported from your project's `src` directory, use Astro's the `setup` frontmatter to import the image file. ```html @@ -182,8 +171,6 @@ description: Just a Hello World Post!
Responsive pictures -
- The `` component can be used to automatically build a `` with multiple sizes and formats. Check out [MDN](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images#art_direction) for a deep dive into responsive images and art direction. By default, the picture will include formats for `avif` and `webp` in addition to the image's original format. @@ -227,3 +214,5 @@ You can also check our [Astro Integration Documentation][astro-integration] for This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! ## Changelog + +See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this integration. diff --git a/packages/integrations/image/package.json b/packages/integrations/image/package.json index 8c79de927..9c42c1ff2 100644 --- a/packages/integrations/image/package.json +++ b/packages/integrations/image/package.json @@ -18,7 +18,7 @@ "image" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/image/", "exports": { ".": { "astro": "./components/index.js", diff --git a/packages/integrations/lit/README.md b/packages/integrations/lit/README.md index 6f4571ee3..49b6b4b9e 100644 --- a/packages/integrations/lit/README.md +++ b/packages/integrations/lit/README.md @@ -29,7 +29,7 @@ If you run into any hiccups, [feel free to log an issue on our GitHub](https://g First, install the `@astrojs/lit` integration like so: -``` +```sh npm install @astrojs/lit ``` @@ -41,7 +41,7 @@ npm install lit @webcomponents/template-shadowroot Now, apply this integration to your `astro.config.*` file using the `integrations` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import lit from '@astrojs/lit'; @@ -63,7 +63,7 @@ However, there's a key difference with Lit _custom elements_ over conventional _ Astro needs to know which tag is associated with which component script. We expose this through exporting a `tagName` variable from the component script. It looks like this: -__src/components/my-element.js__ +__`src/components/my-element.js`__ ```js import { LitElement, html } from 'lit'; @@ -83,7 +83,7 @@ customElements.define(tagName, MyElement); In your Astro template import this component as a side-effect and use the element. -__src/pages/index.astro__ +__`src/pages/index.astro`__ ```astro --- diff --git a/packages/integrations/lit/package.json b/packages/integrations/lit/package.json index f872aadcd..9775b9b6a 100644 --- a/packages/integrations/lit/package.json +++ b/packages/integrations/lit/package.json @@ -18,7 +18,7 @@ "lit" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/lit/", "exports": { ".": "./dist/index.js", "./server.js": "./server.js", diff --git a/packages/integrations/mdx/README.md b/packages/integrations/mdx/README.md index 0a909cc2f..ed3e5ec86 100644 --- a/packages/integrations/mdx/README.md +++ b/packages/integrations/mdx/README.md @@ -22,7 +22,6 @@ Check out [“What is MDX?”](https://mdxjs.com/docs/what-is-mdx/), a deep-dive
Quick Install -
The `astro add` command-line tool automates the installation for you. Run one of the following commands in a new terminal window. (If you aren't sure which package manager you're using, run the first command.) Then, follow the prompts, and type "y" in the terminal (meaning "yes") for each one. @@ -42,17 +41,16 @@ Because this command is new, it might not properly set things up. If that happen
Manual Install -
First, install the `@astrojs/mdx` package using your package manager. If you're using npm or aren't sure, run this in the terminal: - ``` + ```sh npm install @astrojs/mdx ``` Then, apply this integration to your `astro.config.*` file using the `integrations` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import { defineConfig } from 'astro/config'; diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index 22fef393a..a62c73615 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -18,7 +18,7 @@ "mdx" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/mdx/", "exports": { ".": "./dist/index.js", "./package.json": "./package.json" diff --git a/packages/integrations/netlify/README.md b/packages/integrations/netlify/README.md index b34c3ba53..5f6b61fa2 100644 --- a/packages/integrations/netlify/README.md +++ b/packages/integrations/netlify/README.md @@ -30,7 +30,7 @@ npm install @astrojs/netlify Then, install this adapter in your `astro.config.*` file using the `adapter` property. Note: there are two different adapters, one for Netlify Functions and one for Edge Functions. See [Edge Functions](#edge-functions) below on importing the latter. -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import { defineConfig } from 'astro/config'; @@ -62,7 +62,7 @@ After [performing a build](https://docs.astro.build/en/guides/deploy/#building-y Now you can deploy. Install the [Netlify CLI](https://docs.netlify.com/cli/get-started/) and run: -```shell +```sh netlify deploy --build ``` @@ -75,8 +75,6 @@ To configure this adapter, pass an object to the `netlify()` function call in `a
dist - -
We build to the `dist` directory at the base of your project. To change this, use the `dist` option: @@ -115,14 +113,14 @@ We check for common mime types for audio, image, and video files. To include spe import fs from 'node:fs'; export function get() { - const buffer = fs.readFileSync('../image.jpg'); + const buffer = fs.readFileSync('../image.jpg'); // Return the buffer directly, @astrojs/netlify will base64 encode the body return new Response(buffer, { status: 200, - headers: { - 'content-type': 'image/jpeg' - } + headers: { + 'content-type': 'image/jpeg' + } }); } ``` @@ -136,11 +134,17 @@ export function get() { ## Troubleshooting +For help, check out the `#support-threads` channel on [Discord](https://astro.build/chat). Our friendly Support Squad members are here to help! + +You can also check our [Astro Integration Documentation][astro-integration] for more on integrations. + ## Contributing This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! ## Changelog +See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this integration. + [astro-integration]: https://docs.astro.build/en/guides/integrations-guide/ diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index c23ba9a18..acb65de49 100644 --- a/packages/integrations/netlify/package.json +++ b/packages/integrations/netlify/package.json @@ -15,7 +15,7 @@ "astro-adapter" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/netlify/", "exports": { ".": "./dist/index.js", "./functions": "./dist/integration-functions.js", diff --git a/packages/integrations/node/README.md b/packages/integrations/node/README.md index 4652b3dfd..3772a23d8 100644 --- a/packages/integrations/node/README.md +++ b/packages/integrations/node/README.md @@ -6,7 +6,6 @@ This adapter allows Astro to deploy your SSR site to Node targets. - [Installation](#installation) - [Usage](#usage) - [Configuration](#configuration) -- [Examples](#examples) - [Troubleshooting](#troubleshooting) - [Contributing](#contributing) - [Changelog](#changelog) @@ -23,13 +22,14 @@ If you wish to [use server-side rendering (SSR)](https://docs.astro.build/en/gui ## Installation First, install the `@astrojs/node` package using your package manager. If you're using npm or aren't sure, run this in the terminal: + ```sh npm install @astrojs/node ``` Then, install this adapter in your `astro.config.*` file using the `adapter` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import { defineConfig } from 'astro/config'; @@ -96,14 +96,18 @@ http.createServer(function(req, res) { This adapter does not expose any configuration options. -## Examples - ## Troubleshooting +For help, check out the `#support-threads` channel on [Discord](https://astro.build/chat). Our friendly Support Squad members are here to help! + +You can also check our [Astro Integration Documentation][astro-integration] for more on integrations. + ## Contributing This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! ## Changelog +See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this integration. + [astro-integration]: https://docs.astro.build/en/guides/integrations-guide/ diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index 4b31c0b07..a18038438 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -15,7 +15,7 @@ "astro-adapter" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/node/", "exports": { ".": "./dist/index.js", "./server.js": "./dist/server.js", diff --git a/packages/integrations/partytown/README.md b/packages/integrations/partytown/README.md index 59a0f418f..7f8e173a5 100644 --- a/packages/integrations/partytown/README.md +++ b/packages/integrations/partytown/README.md @@ -24,7 +24,6 @@ The Astro Partytown integration installs Partytown for you and makes sure it's e
Quick Install -
The experimental `astro add` command-line tool automates the installation for you. Run one of the following commands in a new terminal window. (If you aren't sure which package manager you're using, run the first command.) Then, follow the prompts, and type "y" in the terminal (meaning "yes") for each one. @@ -44,8 +43,6 @@ Because this command is new, it might not properly set things up. If that happen
Manual Install - -
First, install the `@astrojs/partytown` package using your package manager. If you're using npm or aren't sure, run this in the terminal: ```sh @@ -53,7 +50,7 @@ npm install @astrojs/partytown ``` Then, apply this integration to your `astro.config.*` file using the `integrations` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import { defineConfig } from 'astro/config'; @@ -83,7 +80,7 @@ If you open the "Network" tab from [your browser's dev tools](https://developer. To configure this integration, pass a 'config' object to the `partytown()` function call in `astro.config.mjs`. -__astro.config.mjs__ +__`astro.config.mjs`__ ```js ... export default defineConfig({ @@ -99,14 +96,12 @@ This mirrors the [Partytown config object](https://partytown.builder.io/configur
config.debug - -
Partytown ships with a `debug` mode; enable or disable it by passing `true` or `false` to `config.debug`. If [`debug` mode](https://partytown.builder.io/debugging) is enabled, it will output detailed logs to the browser console. If this option isn't set, `debug` mode will be on by default in [dev](https://docs.astro.build/en/reference/cli-reference/#astro-dev) or [preview](https://docs.astro.build/en/reference/cli-reference/#astro-preview) mode. -__astro.config.mjs__ +__`astro.config.mjs`__ ```js export default defineConfig({ @@ -121,8 +116,6 @@ export default defineConfig({
config.forward -
- Third-party scripts typically add variables to the `window` object so that you can communicate with them throughout your site. But when a script is loaded in a web-worker, it doesn't have access to that global `window` object. To solve this, Partytown can "patch" variables to the global window object and forward them to the appropriate script. @@ -130,7 +123,7 @@ export default defineConfig({ You can specify which variables to forward with the `config.forward` option. [Read more in Partytown's documentation.](https://partytown.builder.io/forwarding-events) -__astro.config.mjs__ +__`astro.config.mjs`__ ```js export default defineConfig ({ @@ -152,10 +145,16 @@ export default defineConfig ({ ## Troubleshooting +For help, check out the `#support-threads` channel on [Discord](https://astro.build/chat). Our friendly Support Squad members are here to help! + +You can also check our [Astro Integration Documentation][astro-integration] for more on integrations. + ## Contributing This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! ## Changelog +See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this integration. + [astro-integration]: https://docs.astro.build/en/guides/integrations-guide/ diff --git a/packages/integrations/partytown/package.json b/packages/integrations/partytown/package.json index ce4dab741..da1d7e1a5 100644 --- a/packages/integrations/partytown/package.json +++ b/packages/integrations/partytown/package.json @@ -18,7 +18,7 @@ "performance" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/partytown/", "exports": { ".": "./dist/index.js", "./package.json": "./package.json" diff --git a/packages/integrations/preact/README.md b/packages/integrations/preact/README.md index d414b8af2..49f51437f 100644 --- a/packages/integrations/preact/README.md +++ b/packages/integrations/preact/README.md @@ -24,7 +24,6 @@ Check out [“Learn Preact in 10 minutes”](https://preactjs.com/tutorial), an
Quick Install -
The `astro add` command-line tool automates the installation for you. Run one of the following commands in a new terminal window. (If you aren't sure which package manager you're using, run the first command.) Then, follow the prompts, and type "y" in the terminal (meaning "yes") for each one. @@ -44,7 +43,6 @@ Because this command is new, it might not properly set things up. If that happen
Manual Install -
First, install the `@astrojs/preact` package using your package manager. If you're using npm or aren't sure, run this in the terminal: @@ -60,7 +58,7 @@ Most package managers will install associated peer dependencies as well. Still, Then, apply this integration to your `astro.config.*` file using the `integrations` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import { defineConfig } from 'astro/config'; diff --git a/packages/integrations/preact/package.json b/packages/integrations/preact/package.json index 333995654..521dee6f7 100644 --- a/packages/integrations/preact/package.json +++ b/packages/integrations/preact/package.json @@ -18,7 +18,7 @@ "preact" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/preact/", "exports": { ".": "./dist/index.js", "./client.js": "./client.js", diff --git a/packages/integrations/prefetch/README.md b/packages/integrations/prefetch/README.md index c97ce076e..ccd0d71e6 100644 --- a/packages/integrations/prefetch/README.md +++ b/packages/integrations/prefetch/README.md @@ -4,9 +4,9 @@ - [Installation](#installation) - [Usage](#usage) - [Configuration](#configuration) -- [Examples](#examples) - [Troubleshooting](#troubleshooting) - [Contributing](#contributing) +- [Changelog](#changelog) ## Why Prefetch? @@ -18,7 +18,6 @@ To further improve the experience, especially on similar pages, stylesheets are
Quick Install -
The experimental `astro add` command-line tool automates the installation for you. Run one of the following commands in a new terminal window. (If you aren't sure which package manager you're using, run the first command.) Then, follow the prompts, and type "y" in the terminal (meaning "yes") for each one. @@ -39,15 +38,13 @@ Because this command is new, it might not properly set things up. If that happen
Manual Install -
- First, install the `@astrojs/prefetch` package using your package manager. If you're using npm or aren't sure, run this in the terminal: ```sh npm install @astrojs/prefetch ``` Then, apply this integration to your `astro.config.*` file using the `integrations` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import prefetch from '@astrojs/prefetch'; @@ -72,11 +69,7 @@ The Astro Prefetch integration handles which links on the site are prefetched an
config.selector -
- By default the prefetch script searches the page for any links that include a `rel="prefetch"` attribute, ex: `` or ``. This behavior can be changed in your `astro.config.*` file to use a custom query selector when finding prefetch links. - -
```js import prefetch from '@astrojs/prefetch'; @@ -94,11 +87,7 @@ export default {
config.throttle -
- By default the prefetch script will only prefetch one link at a time. This behavior can be changed in your `astro.config.*` file to increase the limit for concurrent downloads. - -
```js import prefetch from '@astrojs/prefetch'; @@ -113,14 +102,20 @@ export default { ```
-## Examples - -> Coming soon! - ## Troubleshooting - If your installation doesn't seem to be working, make sure to restart the dev server. - If a link doesn't seem to be prefetching, make sure that the link is pointing to a page on the same domain and matches the integration's `selector` option. +For help, check out the `#support-threads` channel on [Discord](https://astro.build/chat). Our friendly Support Squad members are here to help! + +You can also check our [Astro Integration Documentation][astro-integration] for more on integrations. + ## Contributing This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! + +## Changelog + +See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this integration. + +[astro-integration]: https://docs.astro.build/en/guides/integrations-guide/ diff --git a/packages/integrations/prefetch/package.json b/packages/integrations/prefetch/package.json index 134ecd834..50273ca84 100644 --- a/packages/integrations/prefetch/package.json +++ b/packages/integrations/prefetch/package.json @@ -15,7 +15,7 @@ "astro-integration" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/prefetch/", "exports": { ".": "./dist/index.js", "./client.js": "./dist/client.js", diff --git a/packages/integrations/react/README.md b/packages/integrations/react/README.md index e610faecd..9beebd056 100644 --- a/packages/integrations/react/README.md +++ b/packages/integrations/react/README.md @@ -29,7 +29,7 @@ If you run into any hiccups, [feel free to log an issue on our GitHub](https://g First, install the `@astrojs/react` integration like so: -``` +```sh npm install @astrojs/react ``` @@ -41,7 +41,7 @@ npm install react react-dom Now, apply this integration to your `astro.config.*` file using the `integrations` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import react from '@astrojs/react'; @@ -62,4 +62,4 @@ To use your first React component in Astro, head to our [UI framework documentat Also check our [Astro Integration Documentation][astro-integration] for more on integrations. [astro-integration]: https://docs.astro.build/en/guides/integrations-guide/ -[astro-ui-frameworks]: https://docs.astro.build/en/core-concepts/framework-components/#using-framework-components \ No newline at end of file +[astro-ui-frameworks]: https://docs.astro.build/en/core-concepts/framework-components/#using-framework-components diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index 808a984a8..40f47c2b4 100644 --- a/packages/integrations/react/package.json +++ b/packages/integrations/react/package.json @@ -18,7 +18,7 @@ "react" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/react/", "exports": { ".": "./dist/index.js", "./client.js": "./client.js", diff --git a/packages/integrations/sitemap/README.md b/packages/integrations/sitemap/README.md index 755f84d9c..b7536129f 100644 --- a/packages/integrations/sitemap/README.md +++ b/packages/integrations/sitemap/README.md @@ -24,7 +24,6 @@ With Astro Sitemap, you don't have to worry about creating this file: build your
Quick Install -
The experimental `astro add` command-line tool automates the installation for you. Run one of the following commands in a new terminal window. (If you aren't sure which package manager you're using, run the first command.) Then, follow the prompts, and type "y" in the terminal (meaning "yes") for each one. @@ -44,8 +43,6 @@ Because this command is new, it might not properly set things up. If that happen
Manual Install - -
First, install the `@astrojs/sitemap` package using your package manager. If you're using npm or aren't sure, run this in the terminal: ```sh @@ -53,7 +50,7 @@ npm install @astrojs/sitemap ``` Then, apply this integration to your `astro.config.*` file using the `integrations` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import { defineConfig } from 'astro/config'; @@ -72,7 +69,7 @@ Then, restart the dev server. `@astrojs/sitemap` requires a deployment / site URL for generation. Add your site's URL under your `astro.config.*` using the `site` property. This must begin with `http:` or `https:`. -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import { defineConfig } from 'astro/config'; @@ -93,11 +90,9 @@ Now, [build your site for production](https://docs.astro.build/en/reference/cli- > If you forget to add a `site`, you'll get a friendly warning when you build, and the `sitemap.xml` file won't be generated.
- -Example of generated sitemap content for a two-page website: - +Example of generated files for a two-page website -**sitemap-index.xml** +**`sitemap-index.xml`** ```xml @@ -108,7 +103,7 @@ Example of generated sitemap content for a two-page website: ``` -**sitemap-0.xml** +**`sitemap-0.xml`** ```xml @@ -130,7 +125,7 @@ Example of generated sitemap content for a two-page website: To configure this integration, pass an object to the `sitemap()` function call in `astro.config.mjs`. -__astro.config.mjs__ +__`astro.config.mjs`__ ```js ... export default defineConfig({ @@ -143,11 +138,9 @@ export default defineConfig({
filter -
- All pages are included in your sitemap by default. By adding a custom `filter` function, you can filter included pages by URL. -__astro.config.mjs__ +__`astro.config.mjs`__ ```js ... @@ -163,12 +156,10 @@ The function will be called for every page on your site. The `page` function par
customPages -
- In some cases, a page might be part of your deployed site but not part of your Astro project. If you'd like to include a page in your sitemap that _isn't_ created by Astro, you can use this option. -__astro.config.mjs__ +__`astro.config.mjs`__ ```js ... @@ -179,13 +170,11 @@ __astro.config.mjs__
- - entryLimit - + entryLimit The maximum number entries per sitemap file. The default value is 45000. A sitemap index and multiple sitemaps are created if you have more entries. See this [explanation of splitting up a large sitemap](https://developers.google.com/search/docs/advanced/sitemaps/large-sitemaps). -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import sitemap from '@astrojs/sitemap'; @@ -203,9 +192,7 @@ export default {
- - changefreq, lastmod, and priority - + changefreq, lastmod, and priority These options correspond to the ``, ``, and `` tags in the [Sitemap XML specification.](https://www.sitemaps.org/protocol.html) @@ -214,7 +201,7 @@ Note that `changefreq` and `priority` are ignored by Google. > **Note** > Due to limitations of Astro's [Integration API](https://docs.astro.build/en/reference/integrations-reference/), this integration can't analyze a given page's source code. This configuration option can set `changefreq`, `lastmod` and `priority` on a _site-wide_ basis; see the next option **serialize** for how you can set these values on a per-page basis. -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import sitemap from '@astrojs/sitemap'; @@ -255,7 +242,7 @@ The `serialize` function should return `SitemapItem`, touched or not. The example below shows the ability to add sitemap specific properties individually. -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import sitemap from '@astrojs/sitemap'; @@ -299,7 +286,7 @@ This object has two required properties: [Read more about localization](https://developers.google.com/search/docs/advanced/crawling/localized-versions#all-method-guidelines). -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import sitemap from '@astrojs/sitemap'; @@ -363,11 +350,16 @@ export default { ## Troubleshooting +For help, check out the `#support-threads` channel on [Discord](https://astro.build/chat). Our friendly Support Squad members are here to help! + +You can also check our [Astro Integration Documentation][astro-integration] for more on integrations. + ## Contributing This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! ## Changelog +See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this integration. [astro-integration]: https://docs.astro.build/en/guides/integrations-guide/ diff --git a/packages/integrations/sitemap/package.json b/packages/integrations/sitemap/package.json index 9b48d02e1..285023400 100644 --- a/packages/integrations/sitemap/package.json +++ b/packages/integrations/sitemap/package.json @@ -18,7 +18,7 @@ "sitemap" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/sitemap/", "exports": { ".": "./dist/index.js", "./package.json": "./package.json" diff --git a/packages/integrations/solid/README.md b/packages/integrations/solid/README.md index 366a81512..57bc16c11 100644 --- a/packages/integrations/solid/README.md +++ b/packages/integrations/solid/README.md @@ -29,7 +29,7 @@ If you run into any hiccups, [feel free to log an issue on our GitHub](https://g First, install the `@astrojs/solid-js` integration like so: -``` +```sh npm install @astrojs/solid-js ``` @@ -41,7 +41,7 @@ npm install solid-js Now, apply this integration to your `astro.config.*` file using the `integrations` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import solid from '@astrojs/solid-js'; diff --git a/packages/integrations/solid/package.json b/packages/integrations/solid/package.json index cdb3163ee..f8eb11e6d 100644 --- a/packages/integrations/solid/package.json +++ b/packages/integrations/solid/package.json @@ -18,7 +18,7 @@ "solid" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/solid-js/", "exports": { ".": "./dist/index.js", "./*": "./*", diff --git a/packages/integrations/svelte/README.md b/packages/integrations/svelte/README.md index 7a9ca7bf4..b477613a2 100644 --- a/packages/integrations/svelte/README.md +++ b/packages/integrations/svelte/README.md @@ -29,7 +29,7 @@ If you run into any hiccups, [feel free to log an issue on our GitHub](https://g First, install the `@astrojs/svelte` integration like so: -``` +```sh npm install @astrojs/svelte ``` @@ -41,7 +41,7 @@ npm install svelte Now, apply this integration to your `astro.config.*` file using the `integrations` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import svelte from '@astrojs/svelte'; @@ -90,4 +90,4 @@ const defaultOptions = { The `emitCss`, `compilerOptions.dev`, and `compilerOptions.hydratable` cannot be overridden. -Providing your own `preprocess` options **will** override the defaults - make sure to enable the preprocessor flags needed for your project. \ No newline at end of file +Providing your own `preprocess` options **will** override the defaults - make sure to enable the preprocessor flags needed for your project. diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index 05e1426d2..64e99249a 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -18,7 +18,7 @@ "svelte" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/svelte/", "exports": { ".": "./dist/index.js", "./editor": "./dist/editor.cjs", diff --git a/packages/integrations/tailwind/README.md b/packages/integrations/tailwind/README.md index ae5bc8458..217bd0c56 100644 --- a/packages/integrations/tailwind/README.md +++ b/packages/integrations/tailwind/README.md @@ -27,7 +27,6 @@ https://user-images.githubusercontent.com/4033662/169920154-4b42fc52-e2b5-4ca4-b
Quick Install -
The experimental `astro add` command-line tool automates the installation for you. Run one of the following commands in a new terminal window. (If you aren't sure which package manager you're using, run the first command.) Then, follow the prompts, and type "y" in the terminal (meaning "yes") for each one. @@ -48,15 +47,13 @@ Because this command is new, it might not properly set things up. If that happen
Manual Install -
- First, install the `@astrojs/tailwind` package using your package manager. If you're using npm or aren't sure, run this in the terminal: ```sh npm install @astrojs/tailwind ``` Then, apply this integration to your `astro.config.*` file using the `integrations` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import tailwind from '@astrojs/tailwind'; @@ -91,12 +88,8 @@ The Astro Tailwind integration handles the communication between Astro and Tailw
config.path -
- - If you want to use a different Tailwind configuration file instead of the default `tailwind.config.(js|cjs|mjs)`, specify that file's location using this integration's `config.path` option. If `config.path` is relative, it will be resolved relative to the root. - -
- +If you want to use a different Tailwind configuration file instead of the default `tailwind.config.(js|cjs|mjs)`, specify that file's location using this integration's `config.path` option. If `config.path` is relative, it will be resolved relative to the root. + > **Warning** > Changing this isn't recommended since it can cause problems with other tools that integrate with Tailwind, like the official Tailwind VSCode extension. @@ -115,9 +108,7 @@ export default {
config.applyBaseStyles - -
- + By default, the integration imports a basic `base.css` file on every page of your project. This basic CSS file includes the three main `@tailwind` directives: ```css @@ -167,4 +158,4 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss ## Changelog - +See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this integration. diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 7b9580018..f24c7637d 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -16,7 +16,7 @@ "astro-component" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/tailwind/", "exports": { ".": "./dist/index.js", "./base.css": "./base.css", diff --git a/packages/integrations/vercel/README.md b/packages/integrations/vercel/README.md index e58b7c4b8..b6b6d988d 100644 --- a/packages/integrations/vercel/README.md +++ b/packages/integrations/vercel/README.md @@ -6,7 +6,6 @@ This adapter allows Astro to deploy your SSR site to [Vercel](https://www.vercel - [Installation](#installation) - [Usage](#usage) - [Configuration](#configuration) -- [Examples](#examples) - [Troubleshooting](#troubleshooting) - [Contributing](#contributing) - [Changelog](#changelog) @@ -28,7 +27,7 @@ npm install @astrojs/vercel Then, install this adapter in your `astro.config.*` file using the `adapter` property (note the import from `@astrojs/vercel/serverless` - see [targets](#targets)). - __astro.config.mjs__ + __`astro.config.mjs`__ ```js import { defineConfig } from 'astro/config'; @@ -41,7 +40,7 @@ export default defineConfig({ ### Targets -You can deploy to different targes: +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). @@ -87,16 +86,18 @@ vercel deploy --prebuilt This adapter does not expose any configuration options. -## Examples - ## Troubleshooting **A few known complex packages (example: [puppeteer](https://github.com/puppeteer/puppeteer)) do not support bundling and therefore will not work properly with this adapter.** By default, Vercel doesn't include npm installed files & packages from your project's `./node_modules` folder. To address this, the `@astrojs/vercel` adapter automatically bundles your final build output using `esbuild`. +For help, check out the `#support-threads` channel on [Discord](https://astro.build/chat). Our friendly Support Squad members are here to help! + ## Contributing This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! ## Changelog +See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this integration. + [astro-integration]: https://docs.astro.build/en/guides/integrations-guide/ diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 905d90aab..e9bd30a57 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -14,7 +14,7 @@ "astro-adapter" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/vercel/", "exports": { "./edge": "./dist/edge/adapter.js", "./edge/entrypoint": "./dist/edge/entrypoint.js", diff --git a/packages/integrations/vue/README.md b/packages/integrations/vue/README.md index bbbbb555e..f727e3157 100644 --- a/packages/integrations/vue/README.md +++ b/packages/integrations/vue/README.md @@ -29,7 +29,7 @@ If you run into any hiccups, [feel free to log an issue on our GitHub](https://g First, install the `@astrojs/vue` integration like so: -``` +```sh npm install @astrojs/vue ``` @@ -41,7 +41,7 @@ npm install vue Now, apply this integration to your `astro.config.*` file using the `integrations` property: -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import vue from '@astrojs/vue'; @@ -68,7 +68,7 @@ Also check our [Astro Integration Documentation][astro-integration] for more on This integration is powered by `@vitejs/plugin-vue`. To customize the Vue compiler, options can be provided to the integration. See the `@vitejs/plugin-vue` [docs](https://github.com/vitejs/vite/tree/main/packages/plugin-vue) for more details. -__astro.config.mjs__ +__`astro.config.mjs`__ ```js import vue from '@astrojs/vue'; @@ -85,4 +85,4 @@ export default { // ... })], } -``` \ No newline at end of file +``` diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index 1f4fbca28..031220203 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -18,7 +18,7 @@ "vue" ], "bugs": "https://github.com/withastro/astro/issues", - "homepage": "https://astro.build", + "homepage": "https://docs.astro.build/en/guides/integrations-guide/vue/", "exports": { ".": "./dist/index.js", "./editor": "./dist/editor.cjs",