Skip to content

Commit

Permalink
Added opengraph images for all wing by example pages (#1012)
Browse files Browse the repository at this point in the history
Co-authored-by: David Boyne <[email protected]>
  • Loading branch information
boyney123 and David Boyne authored Sep 11, 2024
1 parent 375ea64 commit 3f67ff1
Show file tree
Hide file tree
Showing 37 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/01-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---


Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/02-hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/03-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/04-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/05-for.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/06-ifelse.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/07-while.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/08-optionality.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/09-arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/10-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/11-sets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---


Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/12-structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/14-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
---


Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/16-closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/17-recursion.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/18-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/19-interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/20-sleep.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/22-regex.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/23-Json.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/24-time.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/25-random.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/26-number-parsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/27-url-parsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/28-sha256.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/31-directories.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/32-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/33-http-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/34-http-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions example_versioned_docs/version-latest/35-exec-processes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Binary file added static/img/wing-by-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3f67ff1

Please sign in to comment.