Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update integrations to MDX syntax #5978

Merged
merged 15 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
resolve other comments
  • Loading branch information
sarah11918 committed Dec 29, 2023
commit 2bfa3a4eed35e135a04828a491e49cd1ea8bde01
18 changes: 9 additions & 9 deletions src/content/docs/en/guides/integrations-guide/cloudflare.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ Add the Cloudflare adapter to enable SSR in your Astro project with the followin

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npx astro add cloudflare
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm astro add cloudflare
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn astro add cloudflare
```
</Fragment>
Expand All @@ -39,17 +39,17 @@ If you prefer to install the adapter manually instead, complete the following tw

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npm install @astrojs/cloudflare
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm add @astrojs/cloudflare
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn add @astrojs/cloudflare
```
</Fragment>
Expand Down Expand Up @@ -82,7 +82,7 @@ This configuration option defines how your Astro project is deployed to Cloudfla

sarah11918 marked this conversation as resolved.
Show resolved Hide resolved
Switching to directory mode allows you to add additional files manually such as [Cloudflare Pages Plugins](https://developers.cloudflare.com/pages/platform/functions/plugins/), [Cloudflare Pages Middleware](https://developers.cloudflare.com/pages/platform/functions/middleware/) or custom functions using [Cloudflare Pages Functions Routing](https://developers.cloudflare.com/pages/platform/functions/routing/).

```js title="astro.config.mjs"
```js title="astro.config.mjs" ins="mode: 'directory'"
export default defineConfig({
adapter: cloudflare({ mode: 'directory' }),
});
Expand Down Expand Up @@ -120,7 +120,7 @@ There are three options available:

Example: For `src/pages/index.astro` (static), `src/pages/company.astro` (static), `src/pages/users/faq.astro` (static) and `/src/pages/users/[id].astro` (SSR) this will produce the following `_routes.json`:

```json
```json title="dist/_routes.json"
{
"version": 1,
"include": [
Expand All @@ -139,7 +139,7 @@ There are three options available:

Example: For the same pages as in the previous example this will produce the following `_routes.json`:

```json
```json title="dist/_routes.json"
{
"version": 1,
"include": [
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/en/guides/integrations-guide/markdoc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ The `astro add` command-line tool automates the installation for you. Run one of

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npx astro add markdoc
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm astro add markdoc
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn astro add markdoc
```
</Fragment>
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/en/guides/integrations-guide/netlify.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ If you prefer to install the adapter manually instead, complete the following tw

2. Add two new lines to your `astro.config.mjs` project configuration file.

```js title="astro.config.mjs" ins={2, 5-6}
```js title="astro.config.mjs" ins={2, 6-7}
import { defineConfig } from 'astro/config';
import netlify from '@astrojs/netlify';

Expand Down Expand Up @@ -130,7 +130,7 @@ This is not available on prerendered pages.

Any Astro middleware is applied to pre-rendered pages at build-time, and to on-demand-rendered pages at runtime.

To implement redirects, access control or custom response headers for pre-rendered pages, run your middleware on Netlify Edge Functions by enabling the `edgeMiddleware` option:
To implement redirects, access control or custom response headers for pre-rendered pages, run your middleware on Netlify Edge Functions by enabling the [`edgeMiddleware` option](/en/reference/adapter-reference/#edgemiddleware):

sarah11918 marked this conversation as resolved.
Show resolved Hide resolved
```js title="astro.config.mjs" ins={7}
import { defineConfig } from 'astro/config';
Expand All @@ -152,7 +152,7 @@ Configuring `edgeMiddleware: true` will deploy your middleware as an Edge Functi
This adapter uses the [Netlify Image CDN](https://docs.netlify.com/image-cdn/) to transform images on-the-fly without impacting build times.
It's implemented using an [Astro Image Service](/en/reference/image-service-reference/) under the hood.

:::note
:::caution
This adapter does not support the `image.domains` and `image.remotePatterns` config properties in your Astro config. To [specify remote paths for Netlify Image CDN](https://docs.netlify.com/image-cdn/overview/#remote-path), use the `remote_images` field in `netlify.toml`.
:::

Expand Down
16 changes: 8 additions & 8 deletions src/content/docs/en/guides/integrations-guide/node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ Add the Node adapter to enable SSR in your Astro project with the following `ast

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npx astro add node
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm astro add node
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn astro add node
```
</Fragment>
Expand All @@ -49,17 +49,17 @@ If you prefer to install the adapter manually instead, complete the following tw

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npm install @astrojs/node
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm add @astrojs/node
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn add @astrojs/node
```
</Fragment>
Expand Down Expand Up @@ -173,7 +173,7 @@ Note that middleware mode does not do file serving. You'll need to configure you

In standalone mode a server starts when the server entrypoint is run. By default it is built to `./dist/server/entry.mjs`. You can run it with:

```shell
```sh
node ./dist/server/entry.mjs
```

Expand All @@ -183,7 +183,7 @@ For standalone mode the server handles file serving in addition to the page and

You can override the host and port the standalone server runs on by passing them as environment variables at runtime:

```shell
```sh
HOST=0.0.0.0 PORT=4321 node ./dist/server/entry.mjs
```

Expand Down
12 changes: 6 additions & 6 deletions src/content/docs/en/guides/integrations-guide/partytown.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ The `astro add` command-line tool automates the installation for you. Run one of

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npx astro add partytown
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm astro add partytown
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn astro add partytown
```
</Fragment>
Expand All @@ -50,17 +50,17 @@ First, install the `@astrojs/partytown` package using your package manager.

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npm install @astrojs/partytown
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm add @astrojs/partytown
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn add @astrojs/partytown
```
</Fragment>
Expand Down
18 changes: 9 additions & 9 deletions src/content/docs/en/guides/integrations-guide/preact.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ The `astro add` command-line tool automates the installation for you. Run one of

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npx astro add preact
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm astro add preact
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn astro add preact
```
</Fragment>
Expand All @@ -52,17 +52,17 @@ First, install the `@astrojs/preact` package using your package manager.

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npm install @astrojs/preact
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm add @astrojs/preact
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn add @astrojs/preact
```
</Fragment>
Expand All @@ -72,17 +72,17 @@ Most package managers will install associated peer dependencies as well. Still,

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npm install preact
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm add preact
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn add preact
```
</Fragment>
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/en/guides/integrations-guide/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ To install `@astrojs/react`, run the following from your project directory and f

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npx astro add react
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm astro add react
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn astro add react
```
</Fragment>
Expand Down
18 changes: 9 additions & 9 deletions src/content/docs/en/guides/integrations-guide/solid-js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ To install `@astrojs/solid-js`, run the following from your project directory an

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npx astro add solid
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm astro add solid
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn astro add solid
```
</Fragment>
Expand All @@ -49,17 +49,17 @@ First, install the `@astrojs/solid-js` integration like so:

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npm install @astrojs/solid-js
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm install @astrojs/solid-js
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn add @astrojs/solid-js
```
</Fragment>
Expand All @@ -69,17 +69,17 @@ Most package managers will install associated peer dependencies as well. Still,

<PackageManagerTabs>
<Fragment slot="npm">
```shell
```sh
npm install solid-js
```
</Fragment>
<Fragment slot="pnpm">
```shell
```sh
pnpm install solid-js
```
</Fragment>
<Fragment slot="yarn">
```shell
```sh
yarn add solid-js
```
</Fragment>
Expand Down
Loading
Loading