Skip to content

Commit bf5d1cc

Browse files
authored
More integration README fixes (#3885)
* Integration README fixes * More tweaks (mostly code backticks for filenames) * Update changeset * Few more tweaks * Make sure code blocks all have a code language * Use URLs of new docs pages for package homepage * One more stray `<br>` 👢 * Standardise to `sh` instead of `shell`
1 parent 1554a37 commit bf5d1cc

35 files changed

Lines changed: 144 additions & 148 deletions

.changeset/calm-balloons-kneel.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@astrojs/cloudflare': patch
3+
'@astrojs/deno': patch
4+
'@astrojs/image': patch
5+
'@astrojs/mdx': patch
6+
'@astrojs/netlify': patch
7+
'@astrojs/node': patch
8+
'@astrojs/partytown': patch
9+
'@astrojs/preact': patch
10+
'@astrojs/prefetch': patch
11+
'@astrojs/react': patch
12+
'@astrojs/sitemap': patch
13+
'@astrojs/solid-js': patch
14+
'@astrojs/svelte': patch
15+
'@astrojs/tailwind': patch
16+
'@astrojs/vercel': patch
17+
'@astrojs/vue': patch
18+
---
19+
20+
Integration README fixes

packages/integrations/cloudflare/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
An SSR adapter for use with Cloudflare Pages Functions targets. Write your code in Astro/Node and deploy to Cloudflare Pages.
44

5-
In your astro.config.mjs use:
5+
In your `astro.config.mjs` use:
66

77
```js
88
import { defineConfig } from 'astro/config';

packages/integrations/cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"astro-adapter"
1616
],
1717
"bugs": "https://github.com/withastro/astro/issues",
18-
"homepage": "https://astro.build",
18+
"homepage": "https://docs.astro.build/en/guides/integrations-guide/cloudflare/",
1919
"exports": {
2020
".": "./dist/index.js",
2121
"./server.js": "./dist/server.js",

packages/integrations/deno/README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ If you wish to [use server-side rendering (SSR)](https://docs.astro.build/en/gui
2222
## Installation
2323

2424
First, install the `@astrojs/deno` package using your package manager. If you're using npm or aren't sure, run this in the terminal:
25+
2526
```sh
2627
npm install @astrojs/deno
2728
```
2829

2930
Then, install this adapter in your `astro.config.*` file using the `adapter` property:
3031

31-
__astro.config.mjs__
32+
__`astro.config.mjs`__
3233

3334
```js
3435
import { defineConfig } from 'astro/config';
@@ -51,7 +52,8 @@ import './dist/entry.mjs';
5152
See the `start` option below for how you can have more control over starting the Astro server.
5253

5354
You can also run the script directly using deno:
54-
```
55+
56+
```sh
5557
deno run --allow-net --allow-read --allow-env ./dist/server/entry.mjs
5658
```
5759

@@ -60,7 +62,8 @@ deno run --allow-net --allow-read --allow-env ./dist/server/entry.mjs
6062

6163
To configure this adapter, pass an object to the `deno()` function call in `astro.config.mjs`.
6264

63-
__astro.config.mjs__
65+
__`astro.config.mjs`__
66+
6467
```js
6568
import { defineConfig } from 'astro/config';
6669
import deno from '@astrojs/deno';
@@ -74,8 +77,6 @@ export default defineConfig({
7477

7578
<details>
7679
<summary><strong>start</strong></summary>
77-
78-
<br/>
7980

8081
This adapter automatically starts a server when it is imported. You can turn this off with the `start` option:
8182

@@ -106,8 +107,6 @@ export default defineConfig({
106107

107108
<details>
108109
<summary><strong>port</strong> and <strong>hostname</strong></summary>
109-
110-
<br/>
111110

112111
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.
113112

@@ -130,10 +129,16 @@ The [Astro Deno](https://github.com/withastro/astro/tree/main/examples/deno) exa
130129

131130
## Troubleshooting
132131

132+
For help, check out the `#support-threads` channel on [Discord](https://astro.build/chat). Our friendly Support Squad members are here to help!
133+
134+
You can also check our [Astro Integration Documentation][astro-integration] for more on integrations.
135+
133136
## Contributing
134137

135138
This package is maintained by Astro's Core team. You're welcome to submit an issue or PR!
136139

137140
## Changelog
138141

142+
See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this integration.
143+
139144
[astro-integration]: https://docs.astro.build/en/guides/integrations-guide/

packages/integrations/deno/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"astro-adapter"
1616
],
1717
"bugs": "https://github.com/withastro/astro/issues",
18-
"homepage": "https://astro.build",
18+
"homepage": "https://docs.astro.build/en/guides/integrations-guide/deno/",
1919
"exports": {
2020
".": "./dist/index.js",
2121
"./server.js": "./dist/server.js",

packages/integrations/image/README.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ This integration provides `<Image />` and `<Picture>` components as well as a ba
2323

2424
<details>
2525
<summary>Quick Install</summary>
26-
<br/>
2726

2827
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.
2928

@@ -44,15 +43,13 @@ Because this command is new, it might not properly set things up. If that happen
4443
<details>
4544
<summary>Manual Install</summary>
4645

47-
<br/>
48-
4946
First, install the `@astrojs/image` package using your package manager. If you're using npm or aren't sure, run this in the terminal:
5047
```sh
5148
npm install @astrojs/image
5249
```
5350
Then, apply this integration to your `astro.config.*` file using the `integrations` property:
5451

55-
__astro.config.mjs__
52+
__`astro.config.mjs`__
5653

5754
```js
5855
import image from '@astrojs/image';
@@ -81,8 +78,6 @@ There are currently no other configuration options for the `@astrojs/image` inte
8178
<details>
8279
<summary><strong>config.serviceEntryPoint</strong></summary>
8380

84-
<br/>
85-
8681
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`.
8782

8883
```js
@@ -103,8 +98,6 @@ export default {
10398
<details>
10499
<summary><strong>Local images</strong></summary>
105100

106-
<br/>
107-
108101
Image files in your project's `src` directory can be imported in frontmatter and passed directly to the `<Image />` component. All other properties are optional and will default to the original image file's properties if not provided.
109102

110103
```html
@@ -133,8 +126,6 @@ import heroImage from '../assets/hero.png';
133126
<details>
134127
<summary><strong>Remote images</strong></summary>
135128

136-
<br/>
137-
138129
Remote images can be transformed with the `<Image />` component. The `<Image />` component needs to know the final dimensions for the `<img />` 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`.
139130

140131
```html
@@ -158,8 +149,6 @@ const imageUrl = 'https://www.google.com/images/branding/googlelogo/2x/googlelog
158149
<details>
159150
<summary><strong>Images in markdown</strong></summary>
160151

161-
<br/>
162-
163152
The `<Image />` 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.
164153

165154
```html
@@ -182,8 +171,6 @@ description: Just a Hello World Post!
182171
<details>
183172
<summary><strong>Responsive pictures</strong></summary>
184173

185-
<br />
186-
187174
The `<Picture />` component can be used to automatically build a `<picture>` 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.
188175

189176
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
227214
This package is maintained by Astro's Core team. You're welcome to submit an issue or PR!
228215

229216
## Changelog
217+
218+
See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this integration.

packages/integrations/image/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"image"
1919
],
2020
"bugs": "https://github.com/withastro/astro/issues",
21-
"homepage": "https://astro.build",
21+
"homepage": "https://docs.astro.build/en/guides/integrations-guide/image/",
2222
"exports": {
2323
".": {
2424
"astro": "./components/index.js",

packages/integrations/lit/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ If you run into any hiccups, [feel free to log an issue on our GitHub](https://g
2929

3030
First, install the `@astrojs/lit` integration like so:
3131

32-
```
32+
```sh
3333
npm install @astrojs/lit
3434
```
3535

@@ -41,7 +41,7 @@ npm install lit @webcomponents/template-shadowroot
4141

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

44-
__astro.config.mjs__
44+
__`astro.config.mjs`__
4545

4646
```js
4747
import lit from '@astrojs/lit';
@@ -63,7 +63,7 @@ However, there's a key difference with Lit _custom elements_ over conventional _
6363

6464
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:
6565

66-
__src/components/my-element.js__
66+
__`src/components/my-element.js`__
6767

6868
```js
6969
import { LitElement, html } from 'lit';
@@ -83,7 +83,7 @@ customElements.define(tagName, MyElement);
8383
8484
In your Astro template import this component as a side-effect and use the element.
8585

86-
__src/pages/index.astro__
86+
__`src/pages/index.astro`__
8787

8888
```astro
8989
---

packages/integrations/lit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"lit"
1919
],
2020
"bugs": "https://github.com/withastro/astro/issues",
21-
"homepage": "https://astro.build",
21+
"homepage": "https://docs.astro.build/en/guides/integrations-guide/lit/",
2222
"exports": {
2323
".": "./dist/index.js",
2424
"./server.js": "./server.js",

packages/integrations/mdx/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Check out [“What is MDX?”](https://mdxjs.com/docs/what-is-mdx/), a deep-dive
2222

2323
<details>
2424
<summary>Quick Install</summary>
25-
<br/>
2625

2726
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.
2827

@@ -42,17 +41,16 @@ Because this command is new, it might not properly set things up. If that happen
4241

4342
<details>
4443
<summary>Manual Install</summary>
45-
<br/>
4644

4745
First, install the `@astrojs/mdx` package using your package manager. If you're using npm or aren't sure, run this in the terminal:
4846

49-
```
47+
```sh
5048
npm install @astrojs/mdx
5149
```
5250

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

55-
__astro.config.mjs__
53+
__`astro.config.mjs`__
5654

5755
```js
5856
import { defineConfig } from 'astro/config';

0 commit comments

Comments
 (0)