Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .changeset/cuddly-donkeys-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'@astrojs/alpinejs': patch
'@astrojs/image': patch
'@astrojs/lit': patch
'@astrojs/mdx': patch
'@astrojs/preact': patch
'@astrojs/prefetch': patch
'@astrojs/react': patch
'@astrojs/sitemap': patch
'@astrojs/solid-js': patch
'@astrojs/svelte': patch
'@astrojs/tailwind': patch
'@astrojs/turbolinks': patch
'@astrojs/vue': patch
---

Update READMEs for consistency
4 changes: 2 additions & 2 deletions packages/integrations/alpinejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ npm install alpinejs @types/alpinejs

Then, apply this integration to your `astro.config.*` file using the `integrations` property:

__`astro.config.mjs`__

```js ins={3} "alpine()"
// astro.config.mjs
```js ins={2} "alpine()"
import { defineConfig } from 'astro/config';
import alpine from '@astrojs/alpinejs';

Expand Down
34 changes: 23 additions & 11 deletions packages/integrations/image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ Then, apply this integration to your `astro.config.*` file using the `integratio

__`astro.config.mjs`__

```js
```js ins={2} "image()"
import { defineConfig } from 'astro/config';
import image from '@astrojs/image';

export default {
export default defineConfig({
// ...
integrations: [image()],
}
});
```

### Installing `sharp` (optional)
Expand All @@ -82,16 +83,18 @@ npm install sharp

Then, update the integration in your `astro.config.*` file to use the built-in `sharp` image transformer.

```js ins={2,7}
// astro.config.mjs
__`astro.config.mjs`__

```js ins={3,8}
import { defineConfig } from 'astro/config';
import image from '@astrojs/image';

export default {
export default defineConfig({
// ...
integrations: [image({
serviceEntryPoint: '@astrojs/image/sharp'
})],
}
})
```

### Update `env.d.ts`
Expand Down Expand Up @@ -446,8 +449,10 @@ The integration can be configured to run with a different image service, either

The `serviceEntryPoint` should resolve to the image service installed from NPM. The default entry point is `@astrojs/image/squoosh`, which resolves to the entry point exported from this integration's `package.json`.

__`astro.config.mjs`__

```js
// astro.config.mjs
import { defineConfig } from 'astro/config';
import image from '@astrojs/image';

export default {
Comment thread
natemoo-re marked this conversation as resolved.
Outdated
Expand All @@ -462,17 +467,19 @@ export default {

The `logLevel` controls can be used to control how much detail is logged by the integration during builds. This may be useful to track down a specific image or transformation that is taking a long time to build.

__`astro.config.mjs`__

```js
// astro.config.mjs
import { defineConfig } from 'astro/config';
import image from '@astrojs/image';

export default {
export default defineConfig({
integrations: [image({
// supported levels: 'debug' | 'info' | 'warn' | 'error' | 'silent'
// default: 'info'
logLevel: 'debug'
})],
}
})
```

### config.cacheDir
Expand All @@ -483,7 +490,12 @@ Local images will be cached for 1 year and invalidated when the original image f

By default, transformed images will be cached to `./node_modules/.astro/image`. This can be configured in the integration's config options.

__`astro.config.mjs`__

```js
import { defineConfig } from 'astro/config';
import image from '@astrojs/image';

export default defineConfig({
integrations: [image({
// may be useful if your hosting provider allows caching between CI builds
Expand Down
7 changes: 4 additions & 3 deletions packages/integrations/lit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ Now, apply this integration to your `astro.config.*` file using the `integration

__`astro.config.mjs`__

```js
```js ins={2} "lit()"
import { defineConfig } from 'astro/config';
import lit from '@astrojs/lit';

export default {
export default defineConfig({
// ...
integrations: [lit()],
}
});
```

## Getting started
Expand Down
Loading