Skip to content

Commit e7e83e0

Browse files
author
Jake Champion
committed
fix links and code block syntax to allow pages to compile
1 parent 5a43183 commit e7e83e0

File tree

624 files changed

+2166
-1555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

624 files changed

+2166
-1555
lines changed

documentation/app/yarn.lock

Lines changed: 667 additions & 0 deletions
Large diffs are not rendered by default.

documentation/docs/fastly:backend/Backend/Backend.mdx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ allowDynamicBackends(true);
2929
new Backend(backendConfiguration)
3030
```
3131

32-
> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.md).
32+
> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).
3333
3434
### Parameters
3535

@@ -41,50 +41,50 @@ new Backend(backendConfiguration)
4141
- The name of the backend.
4242
- The name has to be between 1 and 254 characters inclusive.
4343
- The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.
44-
- Throws a [`TypeError`](../../globals/TypeError/TypeError.md) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.
44+
- Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.
4545
- `target` _: string_
4646
- A hostname, IPv4, or IPv6 address for the backend as well as an optional port.
4747
- The target has to be at-least 1 character.
48-
- Throws a [`TypeError`](../../globals/TypeError/TypeError.md) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`
48+
- Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`
4949
- `hostOverride` _: string_ _**optional**_
5050
- If set, will force the HTTP Host header on connections to this backend to be the supplied value.
51-
- Throws a [`TypeError`](../../globals/TypeError/TypeError.md) if the value is an empty string.
51+
- Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.
5252
- `connectTimeout` _: number_ _**optional**_
5353
- Maximum duration in milliseconds to wait for a connection to this backend to be established.
5454
- If exceeded, the connection is aborted and a 503 response will be presented instead.
55-
- Throws a [`RangeError`](../../globals/RangeError/RangeError.md) if the value is negative or greater than or equal to 2^32
55+
- Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32
5656
- `firstByteTimeout` _: number_ _**optional**_
5757
- Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.
5858
- If exceeded, the connection is aborted and a 503 response will be presented instead.
59-
- Throws a [`RangeError`](../../globals/RangeError/RangeError.md) if the value is negative or greater than or equal to 2^32
59+
- Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32
6060
- `betweenBytesTimeout` _: number_ _**optional**_
6161
- Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.
6262
- If exceeded, the response received so far will be considered complete and the fetch will end.
63-
- Throws a [`RangeError`](../../globals/RangeError/RangeError.md) if the value is negative or greater than or equal to 2^32
63+
- Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32
6464
- `useSSL` _: boolean_ _**optional**_
6565
- Whether or not to require TLS for connections to this backend.
6666
- `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_
6767
- Minimum allowed TLS version on SSL connections to this backend.
6868
- If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.
69-
- Throws a [`RangeError`](../../globals/RangeError/RangeError.md) if the value is not 1, 1.1, 1.2, or 1.3
69+
- Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3
7070
- `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_
7171
- Maximum allowed TLS version on SSL connections to this backend.
7272
- If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.
73-
- Throws a [`RangeError`](../../globals/RangeError/RangeError.md) if the value is not 1, 1.1, 1.2, or 1.3
73+
- Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3
7474
- `certificateHostname` _: string_ _**optional**_
7575
- Define the hostname that the server certificate should declare.
76-
- Throws a [`TypeError`](../../globals/TypeError/TypeError.md) if the value is an empty string.
76+
- Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.
7777
- `caCertificate` _: string_ _**optional**_
7878
- The CA certificate to use when checking the validity of the backend.
79-
- Throws a [`TypeError`](../../globals/TypeError/TypeError.md) if the value is an empty string.
79+
- Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.
8080
- `ciphers` _: string_ _**optional**_
8181
- List of OpenSSL ciphers to support for connections to this origin.
8282
- If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.
8383
- [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).
84-
- Throws a [`TypeError`](../../globals/TypeError/TypeError.md) if the value is an empty string.
84+
- Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.
8585
- `sniHostname` _: string_ _**optional**_
8686
- The SNI hostname to use on connections to this backend.
87-
- Throws a [`TypeError`](../../globals/TypeError/TypeError.md) if the value is an empty string.
87+
- Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.
8888

8989
### Return value
9090

documentation/docs/fastly:backend/Backend/prototype/toString.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ A string representing the specified Backend value.
2222

2323
## Description
2424

25-
The [Backend](../Backend.md) object overrides the `toString()` method of [Object](../../../globals//Object/Object.md); it does not inherit
26-
[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.md). For [Backend](../Backend.md) values, the `toString` method returns the name given to the [Backend](../Backend.md) object during construction.
25+
The [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit
26+
[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.
2727

28-
The `toString()` method requires its `this` value to be a [Backend](../Backend.md) object.
28+
The `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.
2929

30-
If the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.md) is thrown.
30+
If the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.
3131

3232
## Examples
3333

3434
### Using toString()
3535

36-
The following example logs the string value of a [Backend](../Backend.md) object:
36+
The following example logs the string value of a [Backend](../Backend.mdx) object:
3737

3838
<Fiddle config={{
3939
"type": "javascript",

documentation/docs/fastly:cache-override/CacheOverride/CacheOverride.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {Fiddle} from '@site/src/components/fiddle';
1010

1111
The **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.
1212

13-
Normally, the HTTP Headers on a [`Response`](../../globals/Response/Response.md) would control how the [`Response`](../../globals/Response/Response.md) is cached,
14-
but `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.md), to define custom caching behavior.
13+
Normally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,
14+
but `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.
1515

1616
## Syntax
1717

@@ -20,7 +20,7 @@ new CacheOverride(mode)
2020
new CacheOverride(mode, init)
2121
```
2222

23-
> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.md).
23+
> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).
2424
2525
### Parameters
2626

@@ -68,7 +68,6 @@ In this example we override the cache for all the requests prefixed /static/ to
6868
"main": `
6969
/// <reference types="@fastly/js-compute" />
7070
import { CacheOverride } from "fastly:cache-override";
71-
7271
// In this example we override the cache for all the requests prefixed /static/
7372
// to have a long TTL (Time To Live), and the home page to have a short TTL and
7473
// a long SWR (Stale While Revalidate).
@@ -105,10 +104,10 @@ addEventListener("fetch", event => event.respondWith(app(event)));
105104
],
106105
"srcVersion": 1
107106
}}>
107+
108108
```js
109109
/// <reference types="@fastly/js-compute" />
110110
import { CacheOverride } from "fastly:cache-override";
111-
112111
// In this example we override the cache for all the requests prefixed /static/
113112
// to have a long TTL (Time To Live), and the home page to have a short TTL and
114113
// a long SWR (Stale While Revalidate).
@@ -129,4 +128,5 @@ async function app (event) {
129128
}
130129
addEventListener("fetch", event => event.respondWith(app(event)));
131130
```
131+
132132
</Fiddle>

documentation/docs/fastly:config-store/ConfigStore/ConfigStore.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The **`ConfigStore` constructor** lets you access a specific [Fastly Edge Dictio
1818
new ConfigStore(name);
1919
```
2020

21-
> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.md).
21+
> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).
2222
2323
### Parameters
2424

@@ -53,7 +53,6 @@ In this example we have an Edge Dictionary named "animals" and we return the "ca
5353
"main": `
5454
/// <reference types="@fastly/js-compute" />
5555
import { ConfigStore } from "fastly:config-store";
56-
5756
async function app (event) {
5857
const config = new ConfigStore('animals');
5958
return new Response(config.get('cat'));
@@ -87,7 +86,6 @@ addEventListener("fetch", event => event.respondWith(app(event)));
8786
```js
8887
/// <reference types="@fastly/js-compute" />
8988
import { ConfigStore } from "fastly:config-store";
90-
9189
async function app (event) {
9290
const config = new ConfigStore('animals');
9391
return new Response(config.get('cat'));

documentation/docs/fastly:config-store/ConfigStore/prototype/get.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ A `string` representing the specified ConfigStore value or `null` if the key doe
2929

3030
Get a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.
3131

32-
The `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.md) object.
32+
The `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.
3333

34-
If the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.md) is thrown.
34+
If the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.
3535

3636
### Exceptions
3737

@@ -54,7 +54,6 @@ In this example we have an Edge Dictionary named "animals" and we return the "ca
5454
"main": `
5555
/// <reference types="@fastly/js-compute" />
5656
import { ConfigStore } from "fastly:config-store";
57-
5857
async function app (event) {
5958
const config = new ConfigStore('animals');
6059
return new Response(config.get('cat'));
@@ -88,7 +87,6 @@ addEventListener("fetch", event => event.respondWith(app(event)));
8887
```js
8988
/// <reference types="@fastly/js-compute" />
9089
import { ConfigStore } from "fastly:config-store";
91-
9290
async function app (event) {
9391
const config = new ConfigStore('animals');
9492
return new Response(config.get('cat'));

documentation/docs/fastly:dictionary/Dictionary/Dictionary.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The **`Dictionary` constructor** lets you access a specific [Fastly Edge Diction
1818
new Dictionary(name);
1919
```
2020

21-
> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.md).
21+
> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).
2222
2323
### Parameters
2424

@@ -53,7 +53,6 @@ In this example we have an Edge Dictionary named "animals" and we return the "ca
5353
"main": `
5454
/// <reference types="@fastly/js-compute" />
5555
import { Dictionary } from "fastly:dictionary";
56-
5756
async function app (event) {
5857
const config = new Dictionary('animals');
5958
return new Response(config.get('cat'));
@@ -87,11 +86,11 @@ addEventListener("fetch", event => event.respondWith(app(event)));
8786
```js
8887
/// <reference types="@fastly/js-compute" />
8988
import { Dictionary } from "fastly:dictionary";
90-
9189
async function app (event) {
9290
const config = new Dictionary('animals');
9391
return new Response(config.get('cat'));
9492
}
9593
addEventListener("fetch", event => event.respondWith(app(event)));
9694
```
95+
9796
</Fiddle>

documentation/docs/fastly:dictionary/Dictionary/prototype/get.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ A `string` representing the specified Dictionary value or `null` if the key does
3333

3434
Get a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.
3535

36-
The `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.md) object.
36+
The `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.
3737

38-
If the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.md) is thrown.
38+
If the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.
3939

4040
### Exceptions
4141

@@ -58,7 +58,6 @@ In this example we have an Edge Dictionary named "animals" and we return the "ca
5858
"main": `
5959
/// <reference types="@fastly/js-compute" />
6060
import { Dictionary } from "fastly:dictionary";
61-
6261
async function app (event) {
6362
const config = new Dictionary('animals');
6463
return new Response(config.get('cat'));
@@ -92,7 +91,6 @@ addEventListener("fetch", event => event.respondWith(app(event)));
9291
```js
9392
/// <reference types="@fastly/js-compute" />
9493
import { Dictionary } from "fastly:dictionary";
95-
9694
async function app (event) {
9795
const config = new Dictionary('animals');
9896
return new Response(config.get('cat'));

documentation/docs/fastly:env/env.mdx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,13 @@ In this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](h
4444
"main": `
4545
/// <reference types="@fastly/js-compute" />
4646
import { env } from "fastly:env";
47-
4847
function app(event) {
4948
console.log("FASTLY_HOSTNAME:", env("FASTLY_HOSTNAME"));
5049
console.log("FASTLY_TRACE_ID:", env("FASTLY_TRACE_ID"));
51-
5250
return new Response("", {
5351
status: 200
5452
});
5553
}
56-
5754
addEventListener("fetch", event => event.respondWith(app(event)));
5855
`
5956
},
@@ -83,16 +80,14 @@ addEventListener("fetch", event => event.respondWith(app(event)));
8380
```js
8481
/// <reference types="@fastly/js-compute" />
8582
import { env } from "fastly:env";
86-
8783
function app(event) {
8884
console.log("FASTLY_HOSTNAME:", env("FASTLY_HOSTNAME"));
8985
console.log("FASTLY_TRACE_ID:", env("FASTLY_TRACE_ID"));
90-
9186
return new Response("", {
9287
status: 200
9388
});
9489
}
95-
9690
addEventListener("fetch", event => event.respondWith(app(event)));
9791
```
92+
9893
</Fiddle>

documentation/docs/fastly:geolocation/getGeolocationForIpAddress.mdx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,10 @@ In this example we return the geolocation details for the provided ip querystrin
111111
"main": `
112112
/// <reference types="@fastly/js-compute" />
113113
import { getGeolocationForIpAddress } from "fastly:geolocation"
114-
115114
async function app(event) {
116115
try {
117116
let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address
118117
let geo = getGeolocationForIpAddress(ip);
119-
120118
return new Response(JSON.stringify(geo), {
121119
headers: {
122120
"Content-Type": "application/json",
@@ -129,7 +127,6 @@ async function app(event) {
129127
});
130128
}
131129
}
132-
133130
addEventListener("fetch", event => event.respondWith(app(event)));
134131
`
135132
},
@@ -159,12 +156,10 @@ addEventListener("fetch", event => event.respondWith(app(event)));
159156
```js
160157
/// <reference types="@fastly/js-compute" />
161158
import { getGeolocationForIpAddress } from "fastly:geolocation"
162-
163159
async function app(event) {
164160
try {
165161
let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address
166162
let geo = getGeolocationForIpAddress(ip);
167-
168163
return new Response(JSON.stringify(geo), {
169164
headers: {
170165
"Content-Type": "application/json",
@@ -177,9 +172,7 @@ async function app(event) {
177172
});
178173
}
179174
}
180-
181175
addEventListener("fetch", event => event.respondWith(app(event)));
182-
183176
```
184177

185178
</Fiddle>

0 commit comments

Comments
 (0)