Skip to content

Commit d6cc6ec

Browse files
committed
separate syntax highlighting into a different pr
1 parent 380bafa commit d6cc6ec

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

documentation/docs/10-getting-started/30-project-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Project structure
44

55
A typical SvelteKit project looks like this:
66

7-
```tree
7+
```bash
88
my-project/
99
├ src/
1010
│ ├ lib/

documentation/docs/25-build-and-deploy/40-adapter-node.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,21 @@ node +++--env-file=.env+++ build
6767

6868
By default, the server will accept connections on `0.0.0.0` using port 3000. These can be customised with the `PORT` and `HOST` environment variables:
6969

70-
```bash
70+
```
7171
HOST=127.0.0.1 PORT=4000 node build
7272
```
7373

7474
Alternatively, the server can be configured to accept connections on a specified socket path. When this is done using the `SOCKET_PATH` environment variable, the `HOST` and `PORT` environment variables will be disregarded.
7575

76-
```bash
76+
```
7777
SOCKET_PATH=/tmp/socket node build
7878
```
7979

8080
### `ORIGIN`, `PROTOCOL_HEADER`, `HOST_HEADER`, and `PORT_HEADER`
8181

8282
HTTP doesn't give SvelteKit a reliable way to know the URL that is currently being requested. The simplest way to tell SvelteKit where the app is being served is to set the `ORIGIN` environment variable:
8383

84-
```bash
84+
```
8585
ORIGIN=https://my.site node build
8686
8787
# or e.g. for local previewing and testing
@@ -90,7 +90,7 @@ ORIGIN=http://localhost:3000 node build
9090

9191
With this, a request for the `/stuff` pathname will correctly resolve to `https://my.site/stuff`. Alternatively, you can specify headers that tell SvelteKit about the request protocol and host, from which it can construct the origin URL:
9292

93-
```bash
93+
```
9494
PROTOCOL_HEADER=x-forwarded-proto HOST_HEADER=x-forwarded-host node build
9595
```
9696

@@ -106,7 +106,7 @@ If `adapter-node` can't correctly determine the URL of your deployment, you may
106106

107107
The [`RequestEvent`](@sveltejs-kit#RequestEvent) object passed to hooks and endpoints includes an `event.getClientAddress()` function that returns the client's IP address. By default this is the connecting `remoteAddress`. If your server is behind one or more proxies (such as a load balancer), this value will contain the innermost proxy's IP address rather than the client's, so we need to specify an `ADDRESS_HEADER` to read the address from:
108108

109-
```bash
109+
```
110110
ADDRESS_HEADER=True-Client-IP node build
111111
```
112112

@@ -180,7 +180,7 @@ If you need to change the name of the environment variables used to configure th
180180
envPrefix: 'MY_CUSTOM_';
181181
```
182182

183-
```bash
183+
```sh
184184
MY_CUSTOM_HOST=127.0.0.1 \
185185
MY_CUSTOM_PORT=4000 \
186186
MY_CUSTOM_ORIGIN=https://my.site \

documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ https://dash.cloudflare.com/<your-account-id>/home
6767
6868
You will need to install [Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/) and log in, if you haven't already:
6969

70-
```bash
70+
```sh
7171
npm i -D wrangler
7272
wrangler login
7373
```
7474

7575
Then, you can build your app and deploy it:
7676

77-
```bash
77+
```sh
7878
wrangler deploy
7979
```
8080

documentation/docs/25-build-and-deploy/90-adapter-vercel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Set this string as an environment variable on Vercel by logging in and going to
136136

137137
To get this key known about for local development, you can use the [Vercel CLI](https://vercel.com/docs/cli/env) by running the `vercel env pull` command locally like so:
138138

139-
```bash
139+
```sh
140140
vercel env pull .env.development.local
141141
```
142142

documentation/docs/30-advanced/70-packaging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ You can create so-called declaration maps (`d.ts.map` files) by setting `"declar
249249

250250
To publish the generated package:
251251

252-
```bash
252+
```sh
253253
npm publish
254254
```
255255

documentation/docs/60-appendix/10-faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,14 @@ Currently ESM Support within the latest Yarn (version 3) is considered [experime
195195

196196
The below seems to work although your results may vary. First create a new application:
197197

198-
```bash
198+
```sh
199199
yarn create svelte myapp
200200
cd myapp
201201
```
202202

203203
And enable Yarn Berry:
204204

205-
```bash
205+
```sh
206206
yarn set version berry
207207
yarn install
208208
```

0 commit comments

Comments
 (0)