From 5457c52d5f1620d7e4e193cb6c6f6ca54a558903 Mon Sep 17 00:00:00 2001 From: Chew Tee Ming Date: Mon, 30 Jun 2025 09:46:51 +0800 Subject: [PATCH] use the correct markdown syntax language --- .../docs/10-getting-started/30-project-structure.md | 2 +- .../docs/25-build-and-deploy/40-adapter-node.md | 12 ++++++------ .../70-adapter-cloudflare-workers.md | 4 ++-- .../docs/25-build-and-deploy/90-adapter-vercel.md | 2 +- documentation/docs/30-advanced/70-packaging.md | 2 +- documentation/docs/60-appendix/10-faq.md | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/documentation/docs/10-getting-started/30-project-structure.md b/documentation/docs/10-getting-started/30-project-structure.md index 0d9e64141723..64bae0a695c1 100644 --- a/documentation/docs/10-getting-started/30-project-structure.md +++ b/documentation/docs/10-getting-started/30-project-structure.md @@ -4,7 +4,7 @@ title: Project structure A typical SvelteKit project looks like this: -```bash +```tree my-project/ ├ src/ │ ├ lib/ diff --git a/documentation/docs/25-build-and-deploy/40-adapter-node.md b/documentation/docs/25-build-and-deploy/40-adapter-node.md index ce0a5bccf95f..c67db0714efa 100644 --- a/documentation/docs/25-build-and-deploy/40-adapter-node.md +++ b/documentation/docs/25-build-and-deploy/40-adapter-node.md @@ -64,13 +64,13 @@ node +++--env-file=.env+++ build 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: -``` +```bash HOST=127.0.0.1 PORT=4000 node build ``` 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. -``` +```bash SOCKET_PATH=/tmp/socket node build ``` @@ -78,7 +78,7 @@ SOCKET_PATH=/tmp/socket node build 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: -``` +```bash ORIGIN=https://my.site node build # or e.g. for local previewing and testing @@ -87,7 +87,7 @@ ORIGIN=http://localhost:3000 node build 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: -``` +```bash PROTOCOL_HEADER=x-forwarded-proto HOST_HEADER=x-forwarded-host node build ``` @@ -103,7 +103,7 @@ If `adapter-node` can't correctly determine the URL of your deployment, you may 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: -``` +```bash ADDRESS_HEADER=True-Client-IP node build ``` @@ -174,7 +174,7 @@ If you need to change the name of the environment variables used to configure th envPrefix: 'MY_CUSTOM_'; ``` -```sh +```bash MY_CUSTOM_HOST=127.0.0.1 \ MY_CUSTOM_PORT=4000 \ MY_CUSTOM_ORIGIN=https://my.site \ diff --git a/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md b/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md index 942f57fed034..fcd655679d1a 100644 --- a/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md +++ b/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md @@ -64,14 +64,14 @@ https://dash.cloudflare.com//home You will need to install [Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/) and log in, if you haven't already: -```sh +```bash npm i -D wrangler wrangler login ``` Then, you can build your app and deploy it: -```sh +```bash wrangler deploy ``` diff --git a/documentation/docs/25-build-and-deploy/90-adapter-vercel.md b/documentation/docs/25-build-and-deploy/90-adapter-vercel.md index 58e8079cda27..d15ae0f3aca3 100644 --- a/documentation/docs/25-build-and-deploy/90-adapter-vercel.md +++ b/documentation/docs/25-build-and-deploy/90-adapter-vercel.md @@ -131,7 +131,7 @@ Set this string as an environment variable on Vercel by logging in and going to 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: -```sh +```bash vercel env pull .env.development.local ``` diff --git a/documentation/docs/30-advanced/70-packaging.md b/documentation/docs/30-advanced/70-packaging.md index 93294e3f2616..285094390c94 100644 --- a/documentation/docs/30-advanced/70-packaging.md +++ b/documentation/docs/30-advanced/70-packaging.md @@ -249,7 +249,7 @@ You can create so-called declaration maps (`d.ts.map` files) by setting `"declar To publish the generated package: -```sh +```bash npm publish ``` diff --git a/documentation/docs/60-appendix/10-faq.md b/documentation/docs/60-appendix/10-faq.md index 5caa0f5b7b9f..94ebe4950cec 100644 --- a/documentation/docs/60-appendix/10-faq.md +++ b/documentation/docs/60-appendix/10-faq.md @@ -195,14 +195,14 @@ Currently ESM Support within the latest Yarn (version 3) is considered [experime The below seems to work although your results may vary. First create a new application: -```sh +```bash yarn create svelte myapp cd myapp ``` And enable Yarn Berry: -```sh +```bash yarn set version berry yarn install ```