diff --git a/example_versioned_docs/version-latest/01-introduction.md b/example_versioned_docs/version-latest/01-introduction.md index 8b17e801..9016898f 100644 --- a/example_versioned_docs/version-latest/01-introduction.md +++ b/example_versioned_docs/version-latest/01-introduction.md @@ -5,6 +5,7 @@ slug: / sidebar_label: Introduction description: Hands-on introduction to Wing using annotated code keywords: [Wing language, api] +image: /img/wing-by-example.png --- diff --git a/example_versioned_docs/version-latest/02-hello-world.md b/example_versioned_docs/version-latest/02-hello-world.md index d2402a8d..d55b358b 100644 --- a/example_versioned_docs/version-latest/02-hello-world.md +++ b/example_versioned_docs/version-latest/02-hello-world.md @@ -5,6 +5,7 @@ slug: /hello-world sidebar_label: 1. Hello world description: Hello world wing example keywords: [Wing language, example] +image: /img/wing-by-example.png --- # Hello world diff --git a/example_versioned_docs/version-latest/03-values.md b/example_versioned_docs/version-latest/03-values.md index 4e9d10d3..71006c63 100644 --- a/example_versioned_docs/version-latest/03-values.md +++ b/example_versioned_docs/version-latest/03-values.md @@ -5,6 +5,7 @@ slug: /primitive-values sidebar_label: 2. Primitive values description: Hello world wing example keywords: [Wing language, example, primitives, values] +image: /img/wing-by-example.png --- Wing has primitive types including strings, integers, floats, booleans, etc. Here are a few basic examples. diff --git a/example_versioned_docs/version-latest/04-variables.md b/example_versioned_docs/version-latest/04-variables.md index 79fd6d8b..9378db5e 100644 --- a/example_versioned_docs/version-latest/04-variables.md +++ b/example_versioned_docs/version-latest/04-variables.md @@ -5,6 +5,7 @@ slug: /Variables sidebar_label: 4. Variables description: Using variables with Wing keywords: [Wing language, example] +image: /img/wing-by-example.png --- Variables are declared with the `let` keyword. The type of most variables can be inferred automatically, but you can also add an explicit type annotation if needed. diff --git a/example_versioned_docs/version-latest/05-for.md b/example_versioned_docs/version-latest/05-for.md index 041f8d85..20bd993d 100644 --- a/example_versioned_docs/version-latest/05-for.md +++ b/example_versioned_docs/version-latest/05-for.md @@ -5,6 +5,7 @@ slug: /for sidebar_label: 5. For description: Using for loops with Wing keywords: [Wing language, example] +image: /img/wing-by-example.png --- Wing supports looping over collections with `for..in` statements. diff --git a/example_versioned_docs/version-latest/06-ifelse.md b/example_versioned_docs/version-latest/06-ifelse.md index 6f1d9921..7c3dbe87 100644 --- a/example_versioned_docs/version-latest/06-ifelse.md +++ b/example_versioned_docs/version-latest/06-ifelse.md @@ -5,6 +5,7 @@ slug: /if-else sidebar_label: 6. If/Else description: Using if else with Wing keywords: [Wing language, example] +image: /img/wing-by-example.png --- Flow control can be done with if/else statements. The `if` statement is optionally followed by any number of `else if` clauses and a final `else` clause. diff --git a/example_versioned_docs/version-latest/07-while.md b/example_versioned_docs/version-latest/07-while.md index e0c09c0e..dd733e5a 100644 --- a/example_versioned_docs/version-latest/07-while.md +++ b/example_versioned_docs/version-latest/07-while.md @@ -5,6 +5,7 @@ slug: /while sidebar_label: 7. While description: Using while statements with Wing keywords: [Wing language, example] +image: /img/wing-by-example.png --- While loops repeatedly check a condition and run a block of code until the condition is `false`. diff --git a/example_versioned_docs/version-latest/08-optionality.md b/example_versioned_docs/version-latest/08-optionality.md index 10ecbedd..a7dcc8fb 100644 --- a/example_versioned_docs/version-latest/08-optionality.md +++ b/example_versioned_docs/version-latest/08-optionality.md @@ -5,6 +5,7 @@ slug: /optionality sidebar_label: 8. Optionality description: Using while statements with Wing keywords: [Wing language, example] +image: /img/wing-by-example.png --- Nullity is a primary source of bugs in software. Being able to guarantee that a value will never be null makes it easier to write safe code without constantly having to take nullity into account. diff --git a/example_versioned_docs/version-latest/09-arrays.md b/example_versioned_docs/version-latest/09-arrays.md index 24161109..740768dd 100644 --- a/example_versioned_docs/version-latest/09-arrays.md +++ b/example_versioned_docs/version-latest/09-arrays.md @@ -5,6 +5,7 @@ slug: /arrays sidebar_label: 9. Arrays description: Using arrays with Wing keywords: [Wing language, example] +image: /img/wing-by-example.png --- Arrays are dynamically sized in Wing and are created with the [] syntax. diff --git a/example_versioned_docs/version-latest/10-maps.md b/example_versioned_docs/version-latest/10-maps.md index 707c5bf7..d5e6332c 100644 --- a/example_versioned_docs/version-latest/10-maps.md +++ b/example_versioned_docs/version-latest/10-maps.md @@ -5,6 +5,7 @@ slug: /maps sidebar_label: 10. Maps description: Using maps with Wing keywords: [Wing language, example] +image: /img/wing-by-example.png --- Maps are key-value data structures that let you associate strings with any kinds of other values. diff --git a/example_versioned_docs/version-latest/11-sets.md b/example_versioned_docs/version-latest/11-sets.md index 3d11eb0e..5caad221 100644 --- a/example_versioned_docs/version-latest/11-sets.md +++ b/example_versioned_docs/version-latest/11-sets.md @@ -5,6 +5,7 @@ slug: /sets sidebar_label: 11. Sets description: Using sets with Wing keywords: [Wing language, example] +image: /img/wing-by-example.png --- diff --git a/example_versioned_docs/version-latest/12-structs.md b/example_versioned_docs/version-latest/12-structs.md index 70d98a8f..e5fc3007 100644 --- a/example_versioned_docs/version-latest/12-structs.md +++ b/example_versioned_docs/version-latest/12-structs.md @@ -5,6 +5,7 @@ slug: /structs sidebar_label: 12. Structs description: Using arrays with Wing keywords: [Wing language, example] +image: /img/wing-by-example.png --- Structs are custom data types you can define to store structured information. They're loosely modeled after typed JSON literals in JavaScript. diff --git a/example_versioned_docs/version-latest/13-trailing-struct-parameters.md b/example_versioned_docs/version-latest/13-trailing-struct-parameters.md index 41591845..6c3db6f5 100644 --- a/example_versioned_docs/version-latest/13-trailing-struct-parameters.md +++ b/example_versioned_docs/version-latest/13-trailing-struct-parameters.md @@ -5,6 +5,7 @@ slug: /trailing-structs-parameters sidebar_label: 13. Trailing struct parameters description: Passing fields directly to a function keywords: [Wing language, example] +image: /img/wing-by-example.png --- If the last parameter of a function is a struct, then you can pass its fields directly. diff --git a/example_versioned_docs/version-latest/14-async-functions.md b/example_versioned_docs/version-latest/14-async-functions.md index 99d750bc..0a89b7bc 100644 --- a/example_versioned_docs/version-latest/14-async-functions.md +++ b/example_versioned_docs/version-latest/14-async-functions.md @@ -5,6 +5,7 @@ slug: /inflight-functions sidebar_label: 14. Async inflight functions description: Using functions with Wing keywords: [Wing language, example] +image: /img/wing-by-example.png --- Wing supports two function types, [preflight and inflight](/docs/concepts/inflights). diff --git a/example_versioned_docs/version-latest/14-functions.md b/example_versioned_docs/version-latest/14-functions.md index e979177d..efc63690 100644 --- a/example_versioned_docs/version-latest/14-functions.md +++ b/example_versioned_docs/version-latest/14-functions.md @@ -5,6 +5,7 @@ slug: /functions sidebar_label: 14. Functions description: Using functions with Wing keywords: [Wing language, example] +image: /img/wing-by-example.png --- Wing supports two function types [preflight and inflight](/docs/concepts/inflights). diff --git a/example_versioned_docs/version-latest/15-variadic-functions.md b/example_versioned_docs/version-latest/15-variadic-functions.md index b5ad5955..f4e6a51f 100644 --- a/example_versioned_docs/version-latest/15-variadic-functions.md +++ b/example_versioned_docs/version-latest/15-variadic-functions.md @@ -5,6 +5,7 @@ slug: /variadic-functions sidebar_label: 15. Variadic Functions description: Using variadic functions with Wing keywords: [Wing language, variadic] +image: /img/wing-by-example.png --- diff --git a/example_versioned_docs/version-latest/16-closures.md b/example_versioned_docs/version-latest/16-closures.md index 655bde4f..962add01 100644 --- a/example_versioned_docs/version-latest/16-closures.md +++ b/example_versioned_docs/version-latest/16-closures.md @@ -5,6 +5,7 @@ slug: /closures sidebar_label: 16. Closures description: Closures with Wing keywords: [Wing language, variadic] +image: /img/wing-by-example.png --- [Closures](https://en.wikipedia.org/wiki/Closure_(computer_programming)) are functions that captures variables from its surrounding lexical scope, allowing those variables to persist even after the function is executed outside its original context. diff --git a/example_versioned_docs/version-latest/17-recursion.md b/example_versioned_docs/version-latest/17-recursion.md index fee43024..9e973300 100644 --- a/example_versioned_docs/version-latest/17-recursion.md +++ b/example_versioned_docs/version-latest/17-recursion.md @@ -5,6 +5,7 @@ slug: /recursion sidebar_label: 17. Recursion description: Recursion with Wing keywords: [Wing language, variadic] +image: /img/wing-by-example.png --- ```js playground example title="main.w" diff --git a/example_versioned_docs/version-latest/18-methods.md b/example_versioned_docs/version-latest/18-methods.md index ccf4aec7..134ad2af 100644 --- a/example_versioned_docs/version-latest/18-methods.md +++ b/example_versioned_docs/version-latest/18-methods.md @@ -5,6 +5,7 @@ slug: /methods sidebar_label: 18. Methods description: Methods with Wing keywords: [Wing language, variadic] +image: /img/wing-by-example.png --- ```js playground example title="main.w" diff --git a/example_versioned_docs/version-latest/19-interfaces.md b/example_versioned_docs/version-latest/19-interfaces.md index 5787432b..aa160e8f 100644 --- a/example_versioned_docs/version-latest/19-interfaces.md +++ b/example_versioned_docs/version-latest/19-interfaces.md @@ -5,6 +5,7 @@ slug: /interfaces sidebar_label: 19. Interfaces description: Interfaces with Wing keywords: [Wing language, interfaces] +image: /img/wing-by-example.png --- ```js playground example title="main.w" diff --git a/example_versioned_docs/version-latest/20-sleep.md b/example_versioned_docs/version-latest/20-sleep.md index e655d7cd..a2e67d74 100644 --- a/example_versioned_docs/version-latest/20-sleep.md +++ b/example_versioned_docs/version-latest/20-sleep.md @@ -5,6 +5,7 @@ slug: /sleep sidebar_label: 20. Sleep description: Suspends execution for a given duration. keywords: [Wing language, sleep] +image: /img/wing-by-example.png --- `util.sleep` is an [inflight](/docs/concepts/inflights) api. diff --git a/example_versioned_docs/version-latest/21-string-functions.md b/example_versioned_docs/version-latest/21-string-functions.md index 0b836bd3..d10262d4 100644 --- a/example_versioned_docs/version-latest/21-string-functions.md +++ b/example_versioned_docs/version-latest/21-string-functions.md @@ -5,6 +5,7 @@ slug: /string-functions sidebar_label: 21. String functions description: Functions for string values in Wing keywords: [Wing language, string, functions] +image: /img/wing-by-example.png --- Wing provides many useful [string-related functions](/docs/api/standard-library/std/string#string-). Here are some examples to give you a sense of the usage. diff --git a/example_versioned_docs/version-latest/22-regex.md b/example_versioned_docs/version-latest/22-regex.md index 68b87308..e13722c9 100644 --- a/example_versioned_docs/version-latest/22-regex.md +++ b/example_versioned_docs/version-latest/22-regex.md @@ -5,6 +5,7 @@ slug: /regex sidebar_label: 22. Regular expressions description: Functions for string values in Wing keywords: [Wing language, string, functions] +image: /img/wing-by-example.png --- Wing offers built-in support for regular expressions. Here are some examples of common regexp-related tasks in Wing. diff --git a/example_versioned_docs/version-latest/23-Json.md b/example_versioned_docs/version-latest/23-Json.md index 936d8207..af0fa482 100644 --- a/example_versioned_docs/version-latest/23-Json.md +++ b/example_versioned_docs/version-latest/23-Json.md @@ -5,6 +5,7 @@ slug: /json sidebar_label: 23. Json description: Create Json values in Wing keywords: [Wing language, json] +image: /img/wing-by-example.png --- Wing has a dedicated type named `Json` for representing [JSON](https://www.json.org/json-en.html). A `Json` value can be an object, but it can also be an array, string, boolean, number, or null. diff --git a/example_versioned_docs/version-latest/24-time.md b/example_versioned_docs/version-latest/24-time.md index af1a8c2d..4c269196 100644 --- a/example_versioned_docs/version-latest/24-time.md +++ b/example_versioned_docs/version-latest/24-time.md @@ -5,6 +5,7 @@ slug: /time sidebar_label: 24. Time description: Create time/date values in Wing keywords: [Wing language, time, date] +image: /img/wing-by-example.png --- ```js playground example title="main.w" diff --git a/example_versioned_docs/version-latest/25-random.md b/example_versioned_docs/version-latest/25-random.md index 87e997b5..46de2a7c 100644 --- a/example_versioned_docs/version-latest/25-random.md +++ b/example_versioned_docs/version-latest/25-random.md @@ -5,6 +5,7 @@ slug: /random sidebar_label: 25. Random description: Create random values in Wing keywords: [Wing language, random] +image: /img/wing-by-example.png --- Using the [math standard library](/docs/api/standard-library/math/api-reference) you can generate random numbers. diff --git a/example_versioned_docs/version-latest/26-number-parsing.md b/example_versioned_docs/version-latest/26-number-parsing.md index 2b0501d3..0b2389a6 100644 --- a/example_versioned_docs/version-latest/26-number-parsing.md +++ b/example_versioned_docs/version-latest/26-number-parsing.md @@ -5,6 +5,7 @@ slug: /number-parsing sidebar_label: 26. Number Parsing description: Parse values into numbers keywords: [Wing language, random] +image: /img/wing-by-example.png --- ```js playground example title="main.w" diff --git a/example_versioned_docs/version-latest/27-url-parsing.md b/example_versioned_docs/version-latest/27-url-parsing.md index c9c118ad..07ac0fb1 100644 --- a/example_versioned_docs/version-latest/27-url-parsing.md +++ b/example_versioned_docs/version-latest/27-url-parsing.md @@ -5,6 +5,7 @@ slug: /url-parsing sidebar_label: 27. URL parsing description: Parse urls in Wing keywords: [Wing language, URL] +image: /img/wing-by-example.png --- Parse urls using the http module, works with inflight closures. diff --git a/example_versioned_docs/version-latest/28-sha256.md b/example_versioned_docs/version-latest/28-sha256.md index 1dd9194e..a9f0a25d 100644 --- a/example_versioned_docs/version-latest/28-sha256.md +++ b/example_versioned_docs/version-latest/28-sha256.md @@ -5,6 +5,7 @@ slug: /sha256 sidebar_label: 28. SHA256 Hashes description: Hash values in Wing with SHA256 keywords: [Wing language, Hash, SHA256] +image: /img/wing-by-example.png --- ```js playground example title="main.w" diff --git a/example_versioned_docs/version-latest/29-base64-encoding.md b/example_versioned_docs/version-latest/29-base64-encoding.md index 4eaaa959..43ee3303 100644 --- a/example_versioned_docs/version-latest/29-base64-encoding.md +++ b/example_versioned_docs/version-latest/29-base64-encoding.md @@ -5,6 +5,7 @@ slug: /base64-encoding sidebar_label: 29. Base64 Encoding description: Encode and decode Base64 values keywords: [Wing language, Base64] +image: /img/wing-by-example.png --- ```js playground example title="main.w" diff --git a/example_versioned_docs/version-latest/30-reading-writing-files.md b/example_versioned_docs/version-latest/30-reading-writing-files.md index b8da32cb..6687a7b0 100644 --- a/example_versioned_docs/version-latest/30-reading-writing-files.md +++ b/example_versioned_docs/version-latest/30-reading-writing-files.md @@ -5,6 +5,7 @@ slug: /reading-and-writing-files sidebar_label: 30. Reading and writing files description: Reading and writing files with Wing keywords: [Wing language, Reading files, Writing files] +image: /img/wing-by-example.png --- ```js playground example title="main.w" diff --git a/example_versioned_docs/version-latest/31-directories.md b/example_versioned_docs/version-latest/31-directories.md index f6a795a1..cae04463 100644 --- a/example_versioned_docs/version-latest/31-directories.md +++ b/example_versioned_docs/version-latest/31-directories.md @@ -5,6 +5,7 @@ slug: /directories sidebar_label: 31. Directories description: Directories keywords: [Wing language, Directories] +image: /img/wing-by-example.png --- Use the `fs` ("filesystem") module to make, read, check, remove directories. diff --git a/example_versioned_docs/version-latest/32-testing.md b/example_versioned_docs/version-latest/32-testing.md index d53369d9..1403cb05 100644 --- a/example_versioned_docs/version-latest/32-testing.md +++ b/example_versioned_docs/version-latest/32-testing.md @@ -5,6 +5,7 @@ slug: /testing sidebar_label: 32. Testing description: Directories keywords: [Wing language, Directories] +image: /img/wing-by-example.png --- Wing incorporates a [lightweight testing framework](/docs/concepts/tests), which is built around the `wing test` command and the `test` keyword. diff --git a/example_versioned_docs/version-latest/33-http-client.md b/example_versioned_docs/version-latest/33-http-client.md index aaa70013..c14ef758 100644 --- a/example_versioned_docs/version-latest/33-http-client.md +++ b/example_versioned_docs/version-latest/33-http-client.md @@ -5,6 +5,7 @@ slug: /http-client sidebar_label: 33. HTTP Client description: Directories keywords: [Wing language, HTTP] +image: /img/wing-by-example.png --- The Wing standard library comes with [HTTP support](/docs/api/standard-library/http/api-reference). diff --git a/example_versioned_docs/version-latest/34-http-server.md b/example_versioned_docs/version-latest/34-http-server.md index 25557d53..fda1415f 100644 --- a/example_versioned_docs/version-latest/34-http-server.md +++ b/example_versioned_docs/version-latest/34-http-server.md @@ -5,6 +5,7 @@ slug: /http-server sidebar_label: 33. HTTP Server description: Directories keywords: [Wing language, HTTP] +image: /img/wing-by-example.png --- You can create HTTP servers using the [cloud.Api](/docs/api/standard-library/cloud/api) standard library. diff --git a/example_versioned_docs/version-latest/35-exec-processes.md b/example_versioned_docs/version-latest/35-exec-processes.md index ea6d9bed..39fd3ab4 100644 --- a/example_versioned_docs/version-latest/35-exec-processes.md +++ b/example_versioned_docs/version-latest/35-exec-processes.md @@ -5,6 +5,7 @@ slug: /exec-processed sidebar_label: 35. Exec processes description: Exec'ing Processes keywords: [Wing language, HTTP] +image: /img/wing-by-example.png --- ```js playground example title="main.w" diff --git a/static/img/wing-by-example.png b/static/img/wing-by-example.png new file mode 100644 index 00000000..476219bc Binary files /dev/null and b/static/img/wing-by-example.png differ