Skip to content

Commit 89776c9

Browse files
authored
setup algolia (#233)
* setup algolia * change index * escape JS and fix dead links
1 parent 55772c4 commit 89776c9

File tree

5 files changed

+14139
-8605
lines changed

5 files changed

+14139
-8605
lines changed

docs/documentation/buying-storage.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ The lifetime of the batch starts counting down from the moment of purchase. The
9292
Just as with buying storage, since storage comes only in [***discrete sizes***](/docs/storage/#batch-size-breakpoints), the actual amount of additional space when extending the storage size of an existing batch will typically be greater than specified.
9393
:::
9494

95-
If we need to upload more data, then we can extend a batch's storage size using the `bee.extendStorageSize` method. Note that in order to increase the batch size using the `extendStorageSize` method, you must choose a size which is above the current [batch's size breakpoint](/docs/buying-storage/#batch-size-breakpoints).
95+
If we need to upload more data, then we can extend a batch's storage size using the `bee.extendStorageSize` method. Note that in order to increase the batch size using the `extendStorageSize` method, you must choose a size which is above the current [batch's size breakpoint](/docs/storage/#batch-size-breakpoints).
9696

9797
:::tip
98-
As mentioned [above](/docs/buying-storage/#batch-size-breakpoints), the per byte cost decreases as the storage size of a batch increases, so it's more cost effective to increase the storage size an existing batch rather than buying a new, smaller batch.
98+
As mentioned [above](/docs/storage/#batch-size-breakpoints), the per byte cost decreases as the storage size of a batch increases, so it's more cost effective to increase the storage size an existing batch rather than buying a new, smaller batch.
9999

100100
The exception to this rule is if we no longer wish to store the previously uploaded data. In that case we SHOULD buy an all new postage batch, as extending the size of an existing batch would require us to continue paying for the already uploaded data which we no longer need.
101101
:::
@@ -151,7 +151,7 @@ const result = await bee.extendStorageSize(batchId, newSize)
151151
console.log(result)
152152
```
153153

154-
We can check that we successfully extended the batch size by [checking batch status](/docs/buying-storage/#checking-storage-status):
154+
We can check that we successfully extended the batch size by [checking batch status](/docs/storage/#checking-storage-status):
155155

156156
```javascript
157157
[
@@ -178,7 +178,7 @@ We can check that we successfully extended the batch size by [checking batch sta
178178

179179
Here we can see that our batch `size` was successfully extended from ~4.93 GB to ~17.03 GB.
180180

181-
*See [above](/docs/buying-storage/#batch-size-breakpoints) to understand why `size` was extended to ~17.03 even though 5 GB was used as input.*
181+
*See [above](/docs/storage/#batch-size-breakpoints) to understand why `size` was extended to ~17.03 even though 5 GB was used as input.*
182182

183183

184184
### Extending Storage Duration
@@ -236,7 +236,7 @@ const result = await bee.extendStorageDuration(batchId, additionalDuration)
236236
console.log(result)
237237
```
238238

239-
We can verify that the extension was successful by [checking the batch status](/docs/buying-storage/#checking-storage-status). You'll notice the `duration` value on the batch will have increased, reflecting the newly extended storage time:
239+
We can verify that the extension was successful by [checking the batch status](/docs/storage/#checking-storage-status). You'll notice the `duration` value on the batch will have increased, reflecting the newly extended storage time:
240240

241241
```javascript
242242
[
@@ -305,7 +305,7 @@ console.log(cost)
305305
This method helps you determine if it's more economical to **extend** an existing batch or **create a new one**, especially when both dimensions—storage and time—need to grow.
306306

307307
:::tip
308-
If you're unsure whether to extend a batch or start fresh, compare the output of `getExtensionCost` with the cost of a new batch using the [Postage Stamp Pricing Guide](/docs/buying-storage/#batch-size-breakpoints). In many cases, extending is cheaper, especially for larger and longer-lived batches.
308+
If you're unsure whether to extend a batch or start fresh, compare the output of `getExtensionCost` with the cost of a new batch using the [Postage Stamp Pricing Guide](/docs/storage/#batch-size-breakpoints). In many cases, extending is cheaper, especially for larger and longer-lived batches.
309309
:::
310310

311311
If you're happy with the cost, you can then proceed to extend the **size** and **duration** individually by calling `extendStorageSize` and `extendStorageDuration` as shown in the previous sections.
@@ -363,7 +363,7 @@ We can disregard many of these values since they are only needed for advanced us
363363
For an explanation of the remaining values, refer to the "Advanced" section below.
364364
365365
:::tip
366-
Note that although 1 GB was specified as input for the `bee.buyStorage`, the `size` value is ~4.93 GB. Refer to the [section about batch sizes](/docs/buying-storage/#batch-size-breakpoints) above to understand why.
366+
Note that although 1 GB was specified as input for the `bee.buyStorage`, the `size` value is ~4.93 GB. Refer to the [section about batch sizes](/docs/storage/#batch-size-breakpoints) above to understand why.
367367
:::
368368
369369
### Selecting a Batch

docs/documentation/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ That said, the `bee-js` library itself works seamlessly within WSL. If you prefe
8989
You can use [`create-swarm-app`](https://www.npmjs.com/package/create-swarm-app) to quickly set up scaffolding for a `bee-js` project with the following command:
9090

9191
```bash
92-
npm init swarm-app@latest {app-name} {app-type}
92+
npm init swarm-app@latest app-name app-type
9393
```
9494

95-
Replace "{app-name}" with your app's name, and "{app-type}" with the type of app you want. Supported types are `node`, `node-esm`, `node-ts` and `vite-tsx`.
95+
Replace "app-name" with your app's name, and "app-type" with the type of app you want. Supported types are `node`, `node-esm`, `node-ts` and `vite-tsx`.
9696

9797
Start a Swarm project using TypeScript:
9898

@@ -131,6 +131,6 @@ tree .
131131
└── tsconfig.json
132132
```
133133

134-
The exact results will differ slightly depending on which `{app-type}` you use, but they will all include a `config.ts` or `config.js` file where the Bee node's API endpoint must be specified.
134+
The exact results will differ slightly depending on which `app-type` you use, but they will all include a `config.ts` or `config.js` file where the Bee node's API endpoint must be specified.
135135

136136
The endpoint is set to the default Bee API endpoint of `http://localhost:1633`, if your node uses a different endpoint you will need to update it in the config file.

docusaurus.config.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ module.exports = {
66
baseUrl: "/",
77
trailingSlash: true,
88
plugins: [
9-
[
10-
'docusaurus-lunr-search',
11-
{
12-
languages: ['en'], // optional
13-
},
14-
],
159
],
1610
onBrokenLinks: "warn",
1711
onBrokenMarkdownLinks: "warn",
@@ -83,6 +77,15 @@ module.exports = {
8377
],
8478
copyright: `Copyleft © ${new Date().getFullYear()}.`,
8579
},
80+
algolia: {
81+
appId: "D7BASQ1ESY",
82+
83+
apiKey: "8a175ff0c34022d46b4b26cf6f02ad41",
84+
85+
indexName: "bee-js-docs-search",
86+
87+
contextualSearch: false,
88+
},
8689
},
8790
presets: [
8891
[

0 commit comments

Comments
 (0)