From b4a458b92957eeb3ffce795b30a685ee7b3f72ab Mon Sep 17 00:00:00 2001 From: Pedro Sousa <680496+pedrosousa@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:03:22 +0100 Subject: [PATCH 1/2] [Docs] Fix language warnings --- src/content/docs/d1/get-started.mdx | 18 +++++++++--------- .../tutorials/optimize-mobile-viewing.mdx | 10 ++++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/content/docs/d1/get-started.mdx b/src/content/docs/d1/get-started.mdx index fc980a0d46ae1e..0f19e18971303e 100644 --- a/src/content/docs/d1/get-started.mdx +++ b/src/content/docs/d1/get-started.mdx @@ -125,7 +125,7 @@ To create your first D1 database: npx wrangler@latest d1 create prod-d1-tutorial ``` - ```sh output + ```txt output ✅ Successfully created DB 'prod-d1-tutorial' in region WEUR Created your new D1 database. @@ -253,10 +253,10 @@ After correctly preparing your [Wrangler configuration file](/workers/wrangler/c 2. Initialize your database to run and test locally first. Bootstrap your new D1 database by running: - ```sh - npx wrangler d1 execute prod-d1-tutorial --local --file=./schema.sql - ``` - ```output + ```sh + npx wrangler d1 execute prod-d1-tutorial --local --file=./schema.sql + ``` + ```txt output ⛅️ wrangler 4.13.2 ------------------- @@ -275,7 +275,7 @@ After correctly preparing your [Wrangler configuration file](/workers/wrangler/c npx wrangler d1 execute prod-d1-tutorial --local --command="SELECT * FROM Customers" ``` - ```sh output + ```txt output 🌀 Mapping SQL input into an array of statements 🌀 Executing on local database production-db-backend () from .wrangler/state/v3/d1: ┌────────────┬─────────────────────┬───────────────────┐ @@ -424,7 +424,7 @@ To deploy your Worker to production using Wrangler, you must first repeat the [d ```sh npx wrangler d1 execute prod-d1-tutorial --remote --file=./schema.sql ``` - ```sh output + ```txt output ✔ ⚠️ This process may take some time, during which your D1 database will be unavailable to serve queries. Ok to proceed? y 🚣 Executed 3 queries in 0.00 seconds (5 rows read, 6 rows written) @@ -441,7 +441,7 @@ To deploy your Worker to production using Wrangler, you must first repeat the [d ```sh npx wrangler d1 execute prod-d1-tutorial --remote --command="SELECT * FROM Customers" ``` - ```sh output + ```txt output ⛅️ wrangler 4.13.2 ------------------- @@ -466,7 +466,7 @@ To deploy your Worker to production using Wrangler, you must first repeat the [d ```sh npx wrangler deploy ``` - ```sh output + ```txt output ⛅️ wrangler 4.13.2 ------------------- diff --git a/src/content/docs/images/tutorials/optimize-mobile-viewing.mdx b/src/content/docs/images/tutorials/optimize-mobile-viewing.mdx index 631a69d78a7117..dfdb136a21163a 100644 --- a/src/content/docs/images/tutorials/optimize-mobile-viewing.mdx +++ b/src/content/docs/images/tutorials/optimize-mobile-viewing.mdx @@ -29,15 +29,17 @@ There are two possible `loading` attributes for your `` tags: `lazy` and ` Lazy loading is recommended for most images. With Lazy loading, resources like images are deferred until they reach a certain distance from the viewport. If an image does not reach the threshold, then it does not get loaded. Example of modifying the `loading` attribute of your `` tags to be `"lazy"`: -````HTML + +```html -```` +``` ### Eager loading If you have images that are in the viewport, eager loading, instead of lazy loading, is recommended. Eager loading loads the asset at the initial page load, regardless of its location on the page. Example of modifying the `loading` attribute of your `` tags to be `"eager"`: -````HTML + +```html -```` \ No newline at end of file +``` \ No newline at end of file From 2cec4f30344e61a69fdba84bbc44e9e10fa313b7 Mon Sep 17 00:00:00 2001 From: Pedro Sousa <680496+pedrosousa@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:29:07 +0100 Subject: [PATCH 2/2] Fix indentation --- src/content/docs/d1/get-started.mdx | 66 ++++++++++++++--------------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/src/content/docs/d1/get-started.mdx b/src/content/docs/d1/get-started.mdx index 0f19e18971303e..7745d71d8e5a56 100644 --- a/src/content/docs/d1/get-started.mdx +++ b/src/content/docs/d1/get-started.mdx @@ -121,28 +121,24 @@ To create your first D1 database: While Wrangler gets installed locally to your project, you can use it outside the project by using the command `npx wrangler`. ::: - ```sh - npx wrangler@latest d1 create prod-d1-tutorial - ``` - - ```txt output - - ✅ Successfully created DB 'prod-d1-tutorial' in region WEUR - Created your new D1 database. - - { - "d1_databases": [ - { - "binding": "DB", - "database_name": "prod-d1-tutorial", - "database_id": "" - } - ] - } - - ``` - + ```sh + npx wrangler@latest d1 create prod-d1-tutorial + ``` + ```txt output + ✅ Successfully created DB 'prod-d1-tutorial' in region WEUR + Created your new D1 database. + + { + "d1_databases": [ + { + "binding": "DB", + "database_name": "prod-d1-tutorial", + "database_id": "" + } + ] + } + ``` @@ -257,7 +253,7 @@ After correctly preparing your [Wrangler configuration file](/workers/wrangler/c npx wrangler d1 execute prod-d1-tutorial --local --file=./schema.sql ``` ```txt output - ⛅️ wrangler 4.13.2 + ⛅️ wrangler 4.13.2 ------------------- 🌀 Executing on local database prod-d1-tutorial () from .wrangler/state/v3/d1: @@ -442,7 +438,7 @@ To deploy your Worker to production using Wrangler, you must first repeat the [d npx wrangler d1 execute prod-d1-tutorial --remote --command="SELECT * FROM Customers" ``` ```txt output - ⛅️ wrangler 4.13.2 + ⛅️ wrangler 4.13.2 ------------------- 🌀 Executing on remote database prod-d1-tutorial (): @@ -467,18 +463,18 @@ To deploy your Worker to production using Wrangler, you must first repeat the [d npx wrangler deploy ``` ```txt output - ⛅️ wrangler 4.13.2 - ------------------- - - Total Upload: 0.19 KiB / gzip: 0.16 KiB - Your worker has access to the following bindings: - - D1 Databases: - - DB: prod-d1-tutorial () - Uploaded d1-tutorial (3.76 sec) - Deployed d1-tutorial triggers (2.77 sec) - https://d1-tutorial..workers.dev - Current Version ID: - ``` + ⛅️ wrangler 4.13.2 + ------------------- + + Total Upload: 0.19 KiB / gzip: 0.16 KiB + Your worker has access to the following bindings: + - D1 Databases: + - DB: prod-d1-tutorial () + Uploaded d1-tutorial (3.76 sec) + Deployed d1-tutorial triggers (2.77 sec) + https://d1-tutorial..workers.dev + Current Version ID: + ``` You can now visit the URL for your newly created project to query your live database.