diff --git a/docs/build/components/assertions.mdx b/docs/build/components/assertions.mdx
new file mode 100644
index 00000000..c8a14d1e
--- /dev/null
+++ b/docs/build/components/assertions.mdx
@@ -0,0 +1,33 @@
+The CLI conducts several assertions when interacting with your Satellite, one of which involves monitoring the heap memory size. Typically, the CLI checks to ensure that the heap memory does not exceed the 1 GB limit before deployment. For instance, if your heap memory usage is close to 900 MB, the CLI will prompt you to confirm the deployment.
+
+You can customize this behavior by adjusting the heap memory limit in bytes. For example, to set a new limit of 678 MB, update your configuration as follows:
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ assertions: {
+ heapMemory: 678000000
+ }
+ }
+});
+```
+
+Alternatively, these checks can be completely disabled. To do so, set the `heapMemory` assertion to `false`:
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ assertions: {
+ heapMemory: false
+ }
+ }
+});
+```
diff --git a/docs/build/components/encoding.mdx b/docs/build/components/encoding.mdx
new file mode 100644
index 00000000..663c841c
--- /dev/null
+++ b/docs/build/components/encoding.mdx
@@ -0,0 +1,27 @@
+When deploying, the CLI automatically maps the encoding type based on the file extension. The encoding information is then used in the satellite to provide the appropriate HTTP response header `Content-Encoding`.
+
+The default mappings are as follows:
+
+- `.Z` = `compress`
+- `.gz` = `gzip`
+- `.br` = `br`
+- `.zlib` = `deflate`
+- rest = `identity` (no compression)
+
+You can also customize the encoding behavior by using the "encoding" attribute in the configuration file.
+
+This attribute works similarly to Git's `.gitignore`, and you can specify which files to ignore using globs.
+
+Here is an example of how the "encoding" attribute can be utilized:
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ encoding: [["**/releases/*.gz", "identity"]]
+ }
+});
+```
diff --git a/docs/build/components/gzip.mdx b/docs/build/components/gzip.mdx
new file mode 100644
index 00000000..e6aaffc1
--- /dev/null
+++ b/docs/build/components/gzip.mdx
@@ -0,0 +1,31 @@
+When deploying your application, the CLI automatically searches for JavaScript (js), ES Module (mjs), and CSS (css) files in the `source` folder and optimizes them using Gzip compression. This is useful because neither the protocol nor a satellite can compress these files, ensuring the best web performance.
+
+If you wish to customize this behavior, you have the option to disable it or provide a different file matching pattern using glob syntax.
+
+To opt-out of Gzip compression, simply set the `gzip` option to `false` in your configuration:
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ gzip: false
+ }
+});
+```
+
+If you want to customize the default pattern `**/*.+(css|js|mjs)` to better suit your needs, you can specify your own pattern. For example:
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ gzip: "**/*.jpg"
+ }
+});
+```
diff --git a/docs/build/components/http-headers.mdx b/docs/build/components/http-headers.mdx
new file mode 100644
index 00000000..78ae3084
--- /dev/null
+++ b/docs/build/components/http-headers.mdx
@@ -0,0 +1,47 @@
+Headers allow the client and the satellite to pass additional information along with a request or a response. Some sets of headers can affect how the browser handles the page and its content.
+
+For instance, you may want to set a specific `Cache-Control` for performance reasons.
+
+Here's an example of the `headers` object:
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ storage: {
+ headers: [
+ {
+ source: "/",
+ headers: [["Cache-Control", "public,max-age=0,must-revalidate"]]
+ },
+ {
+ source: "assets/fonts/*",
+ headers: [["Cache-Control", "max-age=31536000"]]
+ },
+ {
+ source: "**/*.jpg",
+ headers: [
+ ["Cache-Control", "max-age=31536000"],
+ ["Access-Control-Allow-Origin", "*"]
+ ]
+ }
+ ]
+ }
+ }
+});
+```
+
+This `source` attribute works similarly to Git's `.gitignore`, and you can specify which files match the headers using globs.
+
+The `headers` is an array of objects, each containing `key` and `value`, and these apply to the matching paths.
+
+:::note
+
+- The `Content-Type` header is calculated automatically and cannot be altered.
+- No validation or check for uniqueness is performed. For example, if a header matches a file based on multiple rules, multiple headers will be set.
+- Likewise, if you provide the same header when you [upload](https://juno.build/docs/build/storage#upload-asset) file to your "Storage" and within the configuration, both headers will be set in the response.
+
+:::
diff --git a/docs/build/components/iframe.mdx b/docs/build/components/iframe.mdx
new file mode 100644
index 00000000..1d735cf4
--- /dev/null
+++ b/docs/build/components/iframe.mdx
@@ -0,0 +1,17 @@
+For security reasons and to prevent click-jacking attacks, dapps deployed with Juno are, by default, set to deny embedding in other sites.
+
+You can customize this behavior by setting the `iframe` option to either `same-origin`, which restricts your pages to be displayed only if all ancestor frames have the same origin as the page itself, or `allow-any`, which allows your project to be embeddable by any site.
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ storage: {
+ iframe: "same-origin"
+ }
+ }
+});
+```
diff --git a/docs/build/components/ignore-files.mdx b/docs/build/components/ignore-files.mdx
new file mode 100644
index 00000000..2fdb23a0
--- /dev/null
+++ b/docs/build/components/ignore-files.mdx
@@ -0,0 +1,17 @@
+The `ignore` attribute allows you to exclude certain files from being deployed to your satellite.
+
+This attribute works similarly to Git's `.gitignore`, and you can specify which files to ignore using globs.
+
+Here is an example of how the ignore attribute can be utilized:
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ ignore: ["**/*.txt", ".tmp/"]
+ }
+});
+```
diff --git a/docs/build/components/redirects.mdx b/docs/build/components/redirects.mdx
new file mode 100644
index 00000000..7bb31354
--- /dev/null
+++ b/docs/build/components/redirects.mdx
@@ -0,0 +1,31 @@
+Use a URL redirect to prevent broken links if you've moved a page or to shorten URLs. For example, you could redirect a browser from `juno.build/start-building` to `juno.build/get-started.html`.
+
+Here's the basic structure for a `redirects` attribute.
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ storage: {
+ redirects: [
+ {
+ source: "/hello",
+ location: "/world/index.html",
+ code: 300
+ }
+ ]
+ }
+ }
+});
+```
+
+The `redirects` attribute contains an array of redirect rules:
+
+| Field | Description |
+| ------------ | ------------------------------------------------------------------------------------------------------------------------------- |
+| **source** | This `source` attribute works similarly to Git's `.gitignore`, and you can specify which files match the redirects using globs. |
+| **location** | A relative path to where the browser should make a new request. |
+| **code** | The HTTPS response code. Use a type of `301` for 'Moved Permanently' or `302` for 'Found' (Temporary Redirect). |
diff --git a/docs/build/components/rewrites.mdx b/docs/build/components/rewrites.mdx
new file mode 100644
index 00000000..74c0d21d
--- /dev/null
+++ b/docs/build/components/rewrites.mdx
@@ -0,0 +1,31 @@
+You can utilize optional rewrites to display the same content for multiple URLs. Rewrites are especially useful when combined with pattern matching, allowing acceptance of any URL that matches the pattern.
+
+Here's the basic structure for a `rewrites` attribute.
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ storage: {
+ rewrites: [
+ {
+ source: "/hello/**",
+ destination: "/hello/world.html"
+ }
+ ]
+ }
+ }
+});
+```
+
+This `source` attribute works similarly to Git's `.gitignore`, and you can specify which files match the rewrites using globs.
+
+:::note
+
+- Rewrites are only applied to requests that do not match any existing resources.
+- By default, all unknown paths are automatically rewritten to `/index.html` (or `/404.html` if you provide such a page). You cannot disable this default behavior.
+
+:::
diff --git a/docs/build/components/source.mdx b/docs/build/components/source.mdx
new file mode 100644
index 00000000..fc2e7d1e
--- /dev/null
+++ b/docs/build/components/source.mdx
@@ -0,0 +1,14 @@
+The `source` field specifies the directory containing the built assets for your satellite. This is typically the output directory of your build process, such as `/dist` or `/build`, created after running a command like `npm run build`.
+
+Juno uses this directory to locate the files that will be deployed as part of your satellite. Ensure that this directory includes all the necessary assets, such as HTML, JavaScript, CSS, and any other static or dynamic resources your application requires.
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist"
+ }
+});
+```
diff --git a/docs/build/datastore.md b/docs/build/datastore.md
index c68a09a9..776fc76d 100644
--- a/docs/build/datastore.md
+++ b/docs/build/datastore.md
@@ -483,37 +483,7 @@ await deleteFilteredDocs({
## Configuration
-You can configure various settings of the Datastore.
-
-#### Where do you define your Datastore configuration?
-
-You define your Datastore configuration in your Juno configuration file. The CLI automatically creates the file at the root of your project directory when you run the [juno init](../miscellaneous/cli.mdx#init) or [juno deploy](../miscellaneous/cli.mdx#deploy) command for the first time.
-
-#### How do you apply your changes?
-
-To apply any changes you make in your configuration to your satellite, execute the [juno config](../miscellaneous/cli.mdx#config) command with the CLI.
-
-### Maximum Memory Size
-
-You can configure optional limits on heap and stable memory for your smart contract to control the creation and update of documentations in your Datastore.
-
-When the limit is reached, the Datastore and smart contract will continue to operate normally but will reject changes to documents.
-
-```javascript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "qsgjb-riaaa-aaaaa-aaaga-cai",
- source: "dist",
- datastore: {
- maxMemorySize: {
- stable: 1_073_741_824n // For example max. 1 GiB in bytes of Stable memory
- }
- }
- }
-});
-```
+The Datastore supports various configuration options to fine-tune its behavior, such as resource limits and operational constraints. For a detailed explanation of all available options, see the [configuration](../miscellaneous/configuration.mdx) section.
[satellite]: ../terminology.md#satellite
[controllers]: ../terminology.md#controller
diff --git a/docs/build/hosting.md b/docs/build/hosting.md
deleted file mode 100644
index a158eeb6..00000000
--- a/docs/build/hosting.md
+++ /dev/null
@@ -1,382 +0,0 @@
----
-sidebar_position: 4
-description: "Discover Juno Hosting: Fast, Secure, Blockchain-Powered Web Hosting. Deploy with ease and custom domains."
-keywords: [Fast hosting, Secure hosting, Blockchain hosting, Custom domains]
----
-
-# Hosting
-
-Juno Hosting offers fast and secure hosting powered by 100% blockchain technology.
-
-With just one [CLI] command, you can effortlessly deploy your web applications, static, and dynamic content to your [satellite].
-
----
-
-## Custom Domain Support
-
-You can maintain your unique brand identity with Juno Hosting. Use your custom domain, such as "yolo.com" or "hello.world.com", instead of the default domain name provided by Juno.
-
-Our infrastructure automatically provisions an SSL certificate for each of your domains, ensuring secure connections for your users.
-
-### Connecting Your Domain
-
-To connect your custom domain, follow these steps:
-
-1. Start the custom domain wizard from the Juno console [hosting](https://console.juno.build/hosting) page
-2. Enter the desired domain name for your satellite
-3. Log into your domain provider's site and configure the DNS records as indicated by Juno
-4. Continue the process in Juno
-
-Please note that it may take several minutes to set up your custom domain after the wizard is completed and up to 24 hours for your domain provider to reflect the changes.
-
-### About DNS records
-
-To configure DNS records, you will be requested to use `CNAME` records. Some domain providers do not provide such types. Instead, DNS providers often support so-called `CNAME` flattening. To this end, these DNS providers offer flattened record types, such as `ANAME` or `ALIAS` records, which can be used instead of the `CNAME` to `icp1.io`.
-
-Some DNS providers require you to specify the main domain. For example, you might have to specify your full domain `foo.bar.com` for the `CNAME` entry related to `icp1.io` instead of only `foo` as displayed by our [console].
-
-If you ever encounter issues configuring your DNS, you can also refer to the [Troubleshooting](https://internetcomputer.org/docs/current/developer-docs/production/custom-domain/#troubleshooting) section for further assistance.
-
-### Cloudflare
-
-The DNS entries presented in the console are exactly the ones that should be configured in Cloudflare.
-
-However, based on our experience, to enable the custom domain properly, the following settings in Cloudflare should be disabled:
-
-- DNS > Settings > Disable DNSSEC
-- SSL/TLS > Overview > Set "Your SSL/TLS encryption mode" to "Off (not secure)". A SSL certificate will be automatically ordered by configuring the custom domain.
-- SSL/TLS > Edge Certificates > Disable Universal SSL
-
-Additionally, we recommend not proxying the DNS entries ("DNS only").
-
-### Namecheap
-
-This external guide provides instructions on how to configure the DNS records for [Namecheap](https://internetcomputer.org/docs/current/developer-docs/production/custom-domain/dns-setup#namecheap).
-
-### GoDaddy
-
-This external guide provides instructions on how to configure the DNS records for [GoDaddy](https://internetcomputer.org/docs/current/developer-docs/production/custom-domain/dns-setup#godaddy).
-
-### Google Domains
-
-Google Domains does not support `CNAME` records for the apex domain. For this reason, we suggest transferring the domain to [Cloudflare](#cloudflare).
-
-### Other Limited Providers
-
-We are aware of a few other providers that also do not support `CNAME` records for the apex domain. Similar to Google Domains, we advise transferring the domain to [Cloudflare](#cloudflare) in order to overcome this limitation.
-
-- HostGator
-- Infomaniak
-
-### Status
-
-The status of the configuration of your custom domain can be one of the following:
-
-- `PendingOrder`: The registration request has been submitted and is waiting to be picked up.
-- `PendingChallengeResponse`: The certificate has been ordered.
-- `PendingAcmeApproval`: The challenge has been completed.
-- `Available`: The registration request has been successfully processed. Your custom domain is ready.
-- `Failed`: The registration request failed.
-
-If one of the status `Pending...` is reached, the console will automatically refresh the status every few seconds until your domain is available.
-
----
-
-## Configure Hosting behavior
-
-You can configure customized hosting behavior for requests to your site.
-
-#### What can you configure?
-
-- Specify which `source` files in your local project directory you want to deploy? [Learn how.](#source)
-- Ignore some files during deployment. [Learn how.](#ignore-files)
-- Configure HTTP `headers` to pass along additional information about a request or a response. [Learn how.](#http-headers)
-- Serve a customized 404 page. [Learn how.](#customize-a-404not-found-page)
-- Set up `redirects` for pages that you've moved or deleted. [Learn how.](#redirects)
-- Set up `rewrites`. [Learn how.](#rewrites)
-- Tweak `gzip` compression for best performance. [Learn how.](#gzip)
-- Customize the `encoding` behavior of your files. [Learn how.](#encoding-types)
-- Allow your project to be embedded as an `iframe`. [Learn how.](#iframe)
-- Customize `assertions` to modify the default verification behavior of the CLI. [Learn how.](#assertions)
-
-#### Where do you define your Hosting configuration?
-
-You define your Hosting configuration in your Juno configuration file. The CLI automatically creates the file at the root of your project directory when you run the [juno init](../miscellaneous/cli.mdx#init) or [juno deploy](../miscellaneous/cli.mdx#deploy) command for the first time.
-
-#### How do you apply your changes?
-
-To apply any changes you make in your configuration to your satellite, execute the [juno config](../miscellaneous/cli.mdx#config) command with the CLI.
-
-### Source
-
-Where should Juno search for the files to deploy in your project directory.
-
-This is commonly the output folder of `npm run build`, such as `/dist` or `/build`.
-
-### Ignore files
-
-The `ignore` attribute allows you to exclude certain files from being deployed to your satellite.
-
-This attribute works similarly to Git's `.gitignore`, and you can specify which files to ignore using globs.
-
-Here is an example of how the ignore attribute can be utilized:
-
-```javascript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "qsgjb-riaaa-aaaaa-aaaga-cai",
- source: "dist",
- ignore: ["**/*.txt", ".tmp/"]
- }
-});
-```
-
-### HTTP Headers
-
-Headers allow the client and the satellite to pass additional information along with a request or a response. Some sets of headers can affect how the browser handles the page and its content.
-
-For instance, you may want to set a specific `Cache-Control` for performance reasons.
-
-Here's an example of the `headers` object:
-
-```javascript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "qsgjb-riaaa-aaaaa-aaaga-cai",
- source: "dist",
- storage: {
- headers: [
- {
- source: "/",
- headers: [["Cache-Control", "public,max-age=0,must-revalidate"]]
- },
- {
- source: "assets/fonts/*",
- headers: [["Cache-Control", "max-age=31536000"]]
- },
- {
- source: "**/*.jpg",
- headers: [
- ["Cache-Control", "max-age=31536000"],
- ["Access-Control-Allow-Origin", "*"]
- ]
- }
- ]
- }
- }
-});
-```
-
-This `source` attribute works similarly to Git's `.gitignore`, and you can specify which files match the headers using globs.
-
-The `headers` is an array of objects, each containing `key` and `value`, and these apply to the matching paths.
-
-:::note
-
-- The `Content-Type` header is calculated automatically and cannot be altered.
-- No validation or check for uniqueness is performed. For example, if a header matches a file based on multiple rules, multiple headers will be set.
-- Likewise, if you provide the same header when you [upload](https://juno.build/docs/build/storage#upload-asset) file to your "Storage" and within the configuration, both headers will be set in the response.
-
-:::
-
-### Customize a 404/Not Found page
-
-By default, all unknown paths are automatically rewritten to `/index.html`. However, if you wish to serve a custom `404 Not Found` error when a user attempts to access a non-existent page, you can do so without requiring additional configuration.
-
-Simply upload a custom `404.html` file to your satellite that should be served from the root path of your site.
-
-### Redirects
-
-Use a URL redirect to prevent broken links if you've moved a page or to shorten URLs. For example, you could redirect a browser from `juno.build/start-building` to `juno.build/get-started.html`.
-
-Here's the basic structure for a `redirects` attribute.
-
-```javascript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "qsgjb-riaaa-aaaaa-aaaga-cai",
- source: "dist",
- storage: {
- redirects: [
- {
- source: "/hello",
- location: "/world/index.html",
- code: 300
- }
- ]
- }
- }
-});
-```
-
-The `redirects` attribute contains an array of redirect rules:
-
-| Field | Description |
-| ------------ | ------------------------------------------------------------------------------------------------------------------------------- |
-| **source** | This `source` attribute works similarly to Git's `.gitignore`, and you can specify which files match the redirects using globs. |
-| **location** | A relative path to where the browser should make a new request. |
-| **code** | The HTTPS response code. Use a type of `301` for 'Moved Permanently' or `302` for 'Found' (Temporary Redirect). |
-
-### Rewrites
-
-You can utilize optional rewrites to display the same content for multiple URLs. Rewrites are especially useful when combined with pattern matching, allowing acceptance of any URL that matches the pattern.
-
-Here's the basic structure for a `rewrites` attribute.
-
-```javascript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "qsgjb-riaaa-aaaaa-aaaga-cai",
- source: "dist",
- storage: {
- rewrites: [
- {
- source: "/hello/**",
- destination: "/hello/world.html"
- }
- ]
- }
- }
-});
-```
-
-This `source` attribute works similarly to Git's `.gitignore`, and you can specify which files match the rewrites using globs.
-
-:::note
-
-- Rewrites are only applied to requests that do not match any existing resources.
-- By default, all unknown paths are automatically rewritten to `/index.html` (or `/404.html` if you provide such a page). You cannot disable this default behavior.
-
-:::
-
-### GZIP
-
-When deploying your application, the CLI automatically searches for JavaScript (js), ES Module (mjs), and CSS (css) files in the `source` folder and optimizes them using Gzip compression. This is useful because neither the protocol nor a satellite can compress these files, ensuring the best web performance.
-
-If you wish to customize this behavior, you have the option to disable it or provide a different file matching pattern using glob syntax.
-
-To opt-out of Gzip compression, simply set the `gzip` option to `false` in your configuration:
-
-```javascript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "qsgjb-riaaa-aaaaa-aaaga-cai",
- source: "dist",
- gzip: false
- }
-});
-```
-
-If you want to customize the default pattern `**/*.+(css|js|mjs)` to better suit your needs, you can specify your own pattern. For example:
-
-```javascript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "qsgjb-riaaa-aaaaa-aaaga-cai",
- source: "dist",
- gzip: "**/*.jpg"
- }
-});
-```
-
-### Encoding types
-
-When deploying, the CLI automatically maps the encoding type based on the file extension. The encoding information is then used in the satellite to provide the appropriate HTTP response header `Content-Encoding`.
-
-The default mappings are as follows:
-
-- `.Z` = `compress`
-- `.gz` = `gzip`
-- `.br` = `br`
-- `.zlib` = `deflate`
-- rest = `identity` (no compression)
-
-You can also customize the encoding behavior by using the "encoding" attribute in the configuration file.
-
-This attribute works similarly to Git's `.gitignore`, and you can specify which files to ignore using globs.
-
-Here is an example of how the "encoding" attribute can be utilized:
-
-```javascript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "qsgjb-riaaa-aaaaa-aaaga-cai",
- source: "dist",
- encoding: [["**/releases/*.gz", "identity"]]
- }
-});
-```
-
-### iframe
-
-For security reasons and to prevent click-jacking attacks, dapps deployed with Juno are, by default, set to deny embedding in other sites.
-
-You can customize this behavior by setting the `iframe` option to either `same-origin`, which restricts your pages to be displayed only if all ancestor frames have the same origin as the page itself, or `allow-any`, which allows your project to be embeddable by any site.
-
-```javascript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "qsgjb-riaaa-aaaaa-aaaga-cai",
- source: "dist",
- storage: {
- iframe: "same-origin"
- }
- }
-});
-```
-
-### Assertions
-
-The CLI conducts several assertions when interacting with your Satellite, one of which involves monitoring the heap memory size. Typically, the CLI checks to ensure that the heap memory does not exceed the 1 GB limit before deployment. For instance, if your heap memory usage is close to 900 MB, the CLI will prompt you to confirm the deployment.
-
-You can customize this behavior by adjusting the heap memory limit in bytes. For example, to set a new limit of 678 MB, update your configuration as follows:
-
-```javascript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "qsgjb-riaaa-aaaaa-aaaga-cai",
- source: "dist",
- assertions: {
- heapMemory: 678000000
- }
- }
-});
-```
-
-Alternatively, these checks can be completely disabled. To do so, set the `heapMemory` assertion to `false`:
-
-```javascript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "qsgjb-riaaa-aaaaa-aaaga-cai",
- source: "dist",
- assertions: {
- heapMemory: false
- }
- }
-});
-```
-
-[CLI]: ../miscellaneous/cli.mdx
-[satellite]: ../terminology.md#satellite
-[console]: ../terminology.md#console
diff --git a/docs/build/hosting.mdx b/docs/build/hosting.mdx
new file mode 100644
index 00000000..97f5308d
--- /dev/null
+++ b/docs/build/hosting.mdx
@@ -0,0 +1,172 @@
+---
+sidebar_position: 4
+description: "Discover Juno Hosting: Fast, Secure, Blockchain-Powered Web Hosting. Deploy with ease and custom domains."
+keywords: [Fast hosting, Secure hosting, Blockchain hosting, Custom domains]
+---
+
+# Hosting
+
+Juno Hosting offers fast and secure hosting powered by 100% blockchain technology.
+
+With just one [CLI] command, you can effortlessly deploy your web applications, static, and dynamic content to your [satellite].
+
+---
+
+## Custom Domain Support
+
+You can maintain your unique brand identity with Juno Hosting. Use your custom domain, such as "yolo.com" or "hello.world.com", instead of the default domain name provided by Juno.
+
+Our infrastructure automatically provisions an SSL certificate for each of your domains, ensuring secure connections for your users.
+
+### Connecting Your Domain
+
+To connect your custom domain, follow these steps:
+
+1. Start the custom domain wizard from the Juno console [hosting](https://console.juno.build/hosting) page
+2. Enter the desired domain name for your satellite
+3. Log into your domain provider's site and configure the DNS records as indicated by Juno
+4. Continue the process in Juno
+
+Please note that it may take several minutes to set up your custom domain after the wizard is completed and up to 24 hours for your domain provider to reflect the changes.
+
+### About DNS records
+
+To configure DNS records, you will be requested to use `CNAME` records. Some domain providers do not provide such types. Instead, DNS providers often support so-called `CNAME` flattening. To this end, these DNS providers offer flattened record types, such as `ANAME` or `ALIAS` records, which can be used instead of the `CNAME` to `icp1.io`.
+
+Some DNS providers require you to specify the main domain. For example, you might have to specify your full domain `foo.bar.com` for the `CNAME` entry related to `icp1.io` instead of only `foo` as displayed by our [console].
+
+If you ever encounter issues configuring your DNS, you can also refer to the [Troubleshooting](https://internetcomputer.org/docs/current/developer-docs/production/custom-domain/#troubleshooting) section for further assistance.
+
+### Cloudflare
+
+The DNS entries presented in the console are exactly the ones that should be configured in Cloudflare.
+
+However, based on our experience, to enable the custom domain properly, the following settings in Cloudflare should be disabled:
+
+- DNS > Settings > Disable DNSSEC
+- SSL/TLS > Overview > Set "Your SSL/TLS encryption mode" to "Off (not secure)". A SSL certificate will be automatically ordered by configuring the custom domain.
+- SSL/TLS > Edge Certificates > Disable Universal SSL
+
+Additionally, we recommend not proxying the DNS entries ("DNS only").
+
+### Namecheap
+
+This external guide provides instructions on how to configure the DNS records for [Namecheap](https://internetcomputer.org/docs/current/developer-docs/production/custom-domain/dns-setup#namecheap).
+
+### GoDaddy
+
+This external guide provides instructions on how to configure the DNS records for [GoDaddy](https://internetcomputer.org/docs/current/developer-docs/production/custom-domain/dns-setup#godaddy).
+
+### Google Domains
+
+Google Domains does not support `CNAME` records for the apex domain. For this reason, we suggest transferring the domain to [Cloudflare](#cloudflare).
+
+### Other Limited Providers
+
+We are aware of a few other providers that also do not support `CNAME` records for the apex domain. Similar to Google Domains, we advise transferring the domain to [Cloudflare](#cloudflare) in order to overcome this limitation.
+
+- HostGator
+- Infomaniak
+
+### Status
+
+The status of the configuration of your custom domain can be one of the following:
+
+- `PendingOrder`: The registration request has been submitted and is waiting to be picked up.
+- `PendingChallengeResponse`: The certificate has been ordered.
+- `PendingAcmeApproval`: The challenge has been completed.
+- `Available`: The registration request has been successfully processed. Your custom domain is ready.
+- `Failed`: The registration request failed.
+
+If one of the status `Pending...` is reached, the console will automatically refresh the status every few seconds until your domain is available.
+
+---
+
+## Configure Hosting behavior
+
+You can configure customized hosting behavior for requests to your site.
+
+#### What can you configure?
+
+- Specify which `source` files in your local project directory you want to deploy? [Learn how.](#source)
+- Ignore some files during deployment. [Learn how.](#ignore-files)
+- Configure HTTP `headers` to pass along additional information about a request or a response. [Learn how.](#http-headers)
+- Serve a customized 404 page. [Learn how.](#customize-a-404not-found-page)
+- Set up `redirects` for pages that you've moved or deleted. [Learn how.](#redirects)
+- Set up `rewrites`. [Learn how.](#rewrites)
+- Tweak `gzip` compression for best performance. [Learn how.](#gzip)
+- Customize the `encoding` behavior of your files. [Learn how.](#encoding-types)
+- Allow your project to be embedded as an `iframe`. [Learn how.](#iframe)
+- Customize `assertions` to modify the default verification behavior of the CLI. [Learn how.](#assertions)
+
+#### Where do you define your Hosting configuration?
+
+You define your Hosting configuration in your Juno configuration file. The CLI automatically creates the file at the root of your project directory when you run the [juno init](../miscellaneous/cli.mdx#init) or [juno deploy](../miscellaneous/cli.mdx#deploy) command for the first time.
+
+#### How do you apply your changes?
+
+To apply any changes you make in your configuration to your satellite, execute the [juno config](../miscellaneous/cli.mdx#config) command with the CLI.
+
+### Source
+
+import Source from "./components/source.mdx";
+
+
+
+### Ignore files
+
+import IgnoreFiles from "./components/ignore-files.mdx";
+
+
+
+### HTTP Headers
+
+import HttpHeaders from "./components/http-headers.mdx";
+
+
+
+### Customize a 404/Not Found page
+
+By default, all unknown paths are automatically rewritten to `/index.html`. However, if you wish to serve a custom `404 Not Found` error when a user attempts to access a non-existent page, you can do so without requiring additional configuration.
+
+Simply upload a custom `404.html` file to your satellite that should be served from the root path of your site.
+
+### Redirects
+
+import Redirects from "./components/redirects.mdx";
+
+
+
+### Rewrites
+
+import Rewrites from "./components/rewrites.mdx";
+
+
+
+### GZIP
+
+import Gzip from "./components/gzip.mdx";
+
+
+
+### Encoding types
+
+import Encoding from "./components/encoding.mdx";
+
+
+
+### iframe
+
+import IFrame from "./components/iframe.mdx";
+
+
+
+### Assertions
+
+import Assertions from "./components/assertions.mdx";
+
+
+
+[CLI]: ../miscellaneous/cli.mdx
+[satellite]: ../terminology.md#satellite
+[console]: ../terminology.md#console
diff --git a/docs/build/storage.md b/docs/build/storage.md
index 6b349999..4fbc6ec5 100644
--- a/docs/build/storage.md
+++ b/docs/build/storage.md
@@ -382,11 +382,11 @@ await deleteFilteredAssets({
## Configuration
-You can configure various settings of the Storage.
+The Storage supports various configuration options to optimize its behavior, such as HTTP headers, redirects, and iFrame support. For a detailed explanation of all available options, see the [configuration](../miscellaneous/configuration.mdx) section.
:::note
-If you are looking to configure the hosting behavior of your site, check out the related [documentation](./hosting.md#configure-hosting-behavior).
+If you are looking to configure the hosting behavior of your site, check out the related [documentation](./hosting.mdx#configure-hosting-behavior).
:::
@@ -398,27 +398,5 @@ You define your Storage configuration in your Juno configuration file. The CLI a
To apply any changes you make in your configuration to your satellite, execute the [juno config](../miscellaneous/cli.mdx#config) command with the CLI.
-### Maximum Memory Size
-
-You can configure optional limits on heap and stable memory for your smart contract to control the creation and update of assets in your storage.
-
-When the limit is reached, the Storage and smart contract will continue to operate normally but will reject the upload of new assets.
-
-```javascript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "qsgjb-riaaa-aaaaa-aaaga-cai",
- source: "dist",
- storage: {
- maxMemorySize: {
- stable: 1_073_741_824n // For example max. 1 GiB in bytes of Stable memory
- }
- }
- }
-});
-```
-
[satellite]: ../terminology.md#satellite
[controllers]: ../terminology.md#controller
diff --git a/docs/intro.md b/docs/intro.md
index ef4b5a7c..a83329de 100644
--- a/docs/intro.md
+++ b/docs/intro.md
@@ -61,7 +61,7 @@ Dive deeper into Juno’s capabilities with our feature-rich documentation:
- [Authentication](build/authentication.md)
- [Datastore](build/datastore.md)
- [Storage](build/storage.md)
-- [Hosting](build/hosting.md)
+- [Hosting](build/hosting.mdx)
- [Analytics](build/analytics.md)
---
diff --git a/docs/miscellaneous/cli.mdx b/docs/miscellaneous/cli.mdx
index a723850a..7f5c7956 100644
--- a/docs/miscellaneous/cli.mdx
+++ b/docs/miscellaneous/cli.mdx
@@ -109,7 +109,7 @@ We recommend using the first two options because they can leverage your IDE's In
This file is necessary for deploying, configuring, or running any other CLI commands for your app.
-Read more about the [configuration](./configuration.md).
+Read more about the [configuration](./configuration.mdx).
---
diff --git a/docs/miscellaneous/components/plugins.mdx b/docs/miscellaneous/components/plugins.mdx
new file mode 100644
index 00000000..f8047805
--- /dev/null
+++ b/docs/miscellaneous/components/plugins.mdx
@@ -0,0 +1,8 @@
+:::tip
+
+If you are using a framework like Next.js or Vite, Juno provides plugins to simplify loading Satellite and Orbiter IDs from your configuration file. These plugins automatically handle environment variable management and initialization.
+
+- [Next.js Plugin Documentation](./plugins#nextjs-plugin)
+- [Vite Plugin Documentation](./plugins#vite-plugin)
+
+:::
diff --git a/docs/miscellaneous/configuration.md b/docs/miscellaneous/configuration.md
deleted file mode 100644
index 6cd6a582..00000000
--- a/docs/miscellaneous/configuration.md
+++ /dev/null
@@ -1,135 +0,0 @@
----
-sidebar_position: 3
----
-
-# Configuration
-
-When running `juno` from the command line, it will automatically attempt to locate a config file named `juno.config.ts` or `juno.config.js` or `juno.config.json` within your project's root directory.
-
-A basic config file looks like this:
-
-```typescript
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- id: "aaaaa-bbbbb-ccccc-ddddd-cai",
- source: "build"
- }
-});
-```
-
----
-
-## Config Intellisense
-
-To enable intellisense in your IDE for TypeScript or JavaScript configurations, you will need to install the necessary types:
-
-```bash
-npm install @junobuild/config --save-dev
-```
-
-Afterwards, you can leverage your IDE's intellisense with jsdoc type hints:
-
-```javascript title="juno.config.js"
-/** @type {import('@junobuild/config').JunoConfig} */
-export default {
- // ...
-};
-```
-
-Alternatively, you can use the `defineConfig` helper which should provide intellisense without the need for jsdoc annotations:
-
-```javascript title="juno.config.js"
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- // ...
-});
-```
-
----
-
-## Conditional Config
-
-If the config needs to conditionally determine options based the `mode` being used, it can export a function instead:
-
-```javascript title="juno.config.js"
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig(({ mode }) => ({
- satellite: {
- id: "aaaaa-bbbbb-ccccc-ddddd-cai",
- source: "dist",
- ...(mode === "production" && { iframe: true })
- }
-}));
-```
-
----
-
-## Modes
-
-By default, the CLI runs command for the `production` mode.
-
-This means when running a `juno` command in your terminal, it will pass the mode `production` to read your configuration.
-
-You can overwrite the default mode used for a command by passing the `--mode` option flag. For example, if you want to deploy your app for a `staging` mode:
-
-```bash
-juno deploy --mode staging
-```
-
----
-
-## Environments - Multiple satellites
-
-You may wish to deploy or operate a similar project across various environments. For instance, deploying the same application on multiple satellites can be accomplished by utilizing [modes](#modes).
-
-To accommodate different satellite IDs, you can use a [conditional config](#conditional-config):
-
-```javascript title="juno.config.js"
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig(({ mode }) => ({
- satellite: {
- id:
- mode === "staging"
- ? "11111-22222-33333-44444-cai"
- : "aaaaa-bbbbb-ccccc-ddddd-cai",
- source: "dist"
- }
-}));
-```
-
-Or explicitly list the IDs:
-
-```javascript title="juno.config.js"
-import { defineConfig } from "@junobuild/config";
-
-export default defineConfig({
- satellite: {
- ids: {
- staging: "11111-22222-33333-44444-cai",
- production: "aaaaa-bbbbb-ccccc-ddddd-cai"
- },
- source: "dist"
- }
-});
-```
-
-The latter method is also compatible with JSON configuration:
-
-```json title="juno.config.json"
-{
- "satellite": {
- "ids": {
- "staging": "11111-22222-33333-44444-cai",
- "production": "aaaaa-bbbbb-ccccc-ddddd-cai"
- },
- "source": "dist"
- }
-}
-```
-
-Note that defining an `id` or at least a `production` entry in `ids` is mandatory.
diff --git a/docs/miscellaneous/configuration.mdx b/docs/miscellaneous/configuration.mdx
new file mode 100644
index 00000000..8669a887
--- /dev/null
+++ b/docs/miscellaneous/configuration.mdx
@@ -0,0 +1,395 @@
+---
+sidebar_position: 3
+toc_max_heading_level: 4
+---
+
+# Configuration
+
+When the `juno` command is run from your terminal or used in a CI environment, it will automatically attempt to locate a config file named `juno.config.ts` or `juno.config.js` or `juno.config.json` within your project's root directory.
+
+The Juno config file defines the settings and options needed for managing and deploying your satellites and other project modules, ensuring consistency across environments.
+
+A basic config file looks like this:
+
+```typescript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "build"
+ },
+ orbiter: {
+ id: "eeeee-fffff-ddddd-11111-cai"
+ }
+});
+```
+
+At the top level, the Juno configuration includes two main sections:
+
+1. `satellite` (required): This defines the behavior of your satellite.
+2. `orbiter` (optional): This is useful to automatically map your analytics in your application.
+
+---
+
+## Satellite Configuration
+
+Satellites are the core component of your application in Juno. The satellite configuration defines how the satellite operates, including its identifier, datastore, storage, authentication, and more. This configuration is crucial for managing the satellite’s behavior and deploying it across different environments.
+
+The satellite configuration is defined in your Juno configuration file. Below is a detailed explanation of how to configure it.
+
+### ID or IDs
+
+Each satellite must be uniquely identified using either:
+
+- `id`: A single identifier for the satellite.
+- `ids`: A mapping of identifiers for multiple environments, such as staging or production.
+
+You can use one of these options but not both simultaneously. See the [Environments - Multiple Satellites](#environments---multiple-satellites) chapter below for details on setting up multiple ids.
+
+import Plugins from "./components/plugins.mdx";
+
+
+
+### Source
+
+import Source from "../build/components/source.mdx";
+
+
+
+### Ignore files
+
+import IgnoreFiles from "../build/components/ignore-files.mdx";
+
+
+
+### GZIP
+
+import Gzip from "../build/components/gzip.mdx";
+
+
+
+### Encoding
+
+import Encoding from "../build/components/encoding.mdx";
+
+
+
+### Predeploy
+
+The predeploy option allows you to define a list of scripts or commands to be executed before the deployment process begins. This is particularly useful for automating tasks such as:
+
+- Compiling assets.
+- Running tests or linters.
+- Preparing production-ready files.
+
+These scripts are executed sequentially in the order they are listed.
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ predeploy: ["npm run build", "npm run lint"]
+ }
+});
+```
+
+### Postdeploy
+
+The postdeploy option allows you to define a list of scripts or commands to be executed after the deployment process completes. This can be used for various follow-up tasks, such as:
+
+- Sending notifications or alerts to administrators.
+- Cleaning up temporary files.
+- Logging deployment information for auditing.
+
+Like `predeploy`, these scripts are executed sequentially in the order they are listed.
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ postdeploy: ["./scripts/notify-admins.sh", "echo 'Deployment complete'"]
+ }
+});
+```
+
+### Storage
+
+The `storage` configuration accepts the following options and parameters:
+
+#### HTTP Headers
+
+import HttpHeaders from "../build/components/http-headers.mdx";
+
+
+
+#### Rewrites
+
+import Rewrites from "../build/components/rewrites.mdx";
+
+
+
+#### Redirects
+
+import Redirects from "../build/components/redirects.mdx";
+
+
+
+#### iframe
+
+import IFrame from "../build/components/iframe.mdx";
+
+
+
+#### Maximum Memory Size
+
+You can configure optional limits on heap and stable memory for your smart contract to control the creation and update of assets in your storage.
+
+When the limit is reached, the Storage and smart contract will continue to operate normally but will reject the upload of new assets.
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ storage: {
+ maxMemorySize: {
+ stable: 1_073_741_824n // For example max. 1 GiB in bytes of Stable memory
+ }
+ }
+ }
+});
+```
+
+### Datastore
+
+The `datastore` configuration accepts the following options and parameters:
+
+#### Maximum Memory Size
+
+You can configure optional limits on heap and stable memory for your smart contract to control the creation and update of documentations in your Datastore.
+
+When the limit is reached, the Datastore and smart contract will continue to operate normally but will reject changes to documents.
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ source: "dist",
+ datastore: {
+ maxMemorySize: {
+ stable: 1_073_741_824n // For example max. 1 GiB in bytes of Stable memory
+ }
+ }
+ }
+});
+```
+
+### Authentication
+
+The `authentication` configuration accepts the following options and parameters:
+
+#### Derivation origin
+
+The behavior of Internet Identity can be customized to ensure that users are recognized consistently across different domains or subdomains of your application.
+
+For example, if you set `derivationOrigin` to "hello.com", a user signing in at https://hello.com will receive the same identifier (principal) as when signing in at https://www.hello.com.
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ authentication: {
+ internetIdentity: {
+ derivationOrigin: "hello.com"
+ }
+ }
+ }
+});
+```
+
+### Assertions
+
+import Assertions from "../build/components/assertions.mdx";
+
+
+
+### Settings
+
+The `settings` field allows you to configure various aspects of the module’s behavior and resource usage, such as memory limits, compute allocation, and log visibility.
+
+Overview:
+
+- **Freezing Threshold**: Prevents the module from being deleted by pausing operations when cycles drop below a certain level.
+- **Reserved Cycles Limit**: Ensures a minimum number of cycles are available for future operations.
+- **Log Visibility**: Controls who can access the module’s logs.
+- **Heap Memory Limit**: Sets the hard maximum heap memory available to the module.
+- **Memory Allocation**: Pre-allocates memory for optimized performance.
+- **Compute Allocation**: Reserves a percentage of the subnet’s compute resources.
+
+```javascript
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai",
+ settings: {
+ freezingThreshold: 2_592_000n,
+ reservedCyclesLimit: 5_000_000_000_000n,
+ logVisibility: "controllers",
+ heapMemoryLimit: 2048n,
+ memoryAllocation: 1_073_741_824n,
+ computeAllocation: 50n
+ }
+ }
+});
+```
+
+For a complete explanation of all [settings](./settings.md), including detailed examples and calculations, see the Settings section.
+
+---
+
+## Orbiter Configuration
+
+Orbiters are an optional component of your application used for analytics.
+
+### ID
+
+An orbiter has a unique identifier (id). This ID is used to reference the orbiter during operations and deployments.
+
+
+
+---
+
+## Apply Changes
+
+Configurations such as above [storage](#storage), [datastore](#datastore), [authentication](#authentication), and [settings](#settings) require explicit application to your smart contract as they directly impact its behavior.
+
+To apply your changes, run the [juno config](./cli#config) command in the CLI after modifying your configuration file.
+
+---
+
+## Intellisense
+
+To enable intellisense in your IDE for TypeScript or JavaScript configurations, you will need to install the necessary types:
+
+```bash
+npm install @junobuild/config --save-dev
+```
+
+Afterwards, you can leverage your IDE's intellisense with jsdoc type hints:
+
+```javascript title="juno.config.js"
+/** @type {import('@junobuild/config').JunoConfig} */
+export default {
+ // ...
+};
+```
+
+Alternatively, you can use the `defineConfig` helper which should provide intellisense without the need for jsdoc annotations:
+
+```javascript title="juno.config.js"
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ // ...
+});
+```
+
+---
+
+## Conditional Config
+
+If the config needs to conditionally determine options based the `mode` being used, it can export a function instead:
+
+```javascript title="juno.config.js"
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig(({ mode }) => ({
+ satellite: {
+ id: "aaaaa-bbbbb-ccccc-ddddd-cai",
+ source: "dist",
+ ...(mode === "production" && { iframe: true })
+ }
+}));
+```
+
+---
+
+## Modes
+
+By default, the CLI runs command for the `production` mode.
+
+This means when running a `juno` command in your terminal, it will pass the mode `production` to read your configuration.
+
+You can overwrite the default mode used for a command by passing the `--mode` option flag. For example, if you want to deploy your app for a `staging` mode:
+
+```bash
+juno deploy --mode staging
+```
+
+---
+
+## Environments - Multiple satellites
+
+You may wish to deploy or operate a similar project across various environments. For instance, deploying the same application on multiple satellites can be accomplished by utilizing [modes](#modes).
+
+To accommodate different satellite IDs, you can use a [conditional config](#conditional-config):
+
+```javascript title="juno.config.js"
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig(({ mode }) => ({
+ satellite: {
+ id:
+ mode === "staging"
+ ? "11111-22222-33333-44444-cai"
+ : "aaaaa-bbbbb-ccccc-ddddd-cai",
+ source: "dist"
+ }
+}));
+```
+
+Or explicitly list the IDs:
+
+```javascript title="juno.config.js"
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ ids: {
+ staging: "11111-22222-33333-44444-cai",
+ production: "aaaaa-bbbbb-ccccc-ddddd-cai"
+ },
+ source: "dist"
+ }
+});
+```
+
+The latter method is also compatible with JSON configuration:
+
+```json title="juno.config.json"
+{
+ "satellite": {
+ "ids": {
+ "staging": "11111-22222-33333-44444-cai",
+ "production": "aaaaa-bbbbb-ccccc-ddddd-cai"
+ },
+ "source": "dist"
+ }
+}
+```
+
+Note that defining an `id` or at least a `production` entry in `ids` is mandatory.
diff --git a/docs/miscellaneous/controllers.md b/docs/miscellaneous/controllers.md
index 16b02c14..c8fa7730 100644
--- a/docs/miscellaneous/controllers.md
+++ b/docs/miscellaneous/controllers.md
@@ -6,7 +6,7 @@ sidebar_position: 9
Controllers play a crucial role in granting permissions to mission controls and satellites within Juno.
-An administrative controller can perform tasks such as configuring or deploying an app, topping up a mission control or satellite, creating a new collection in the [datastore](build/datastore.md) or [storage](build/storage.md), or configuring a custom domain in the [hosting](build/hosting.md).
+An administrative controller can perform tasks such as configuring or deploying an app, topping up a mission control or satellite, creating a new collection in the [datastore](build/datastore.md) or [storage](build/storage.md), or configuring a custom domain in the [hosting](build/hosting.mdx).
When you sign in to Juno's [console] using [Internet Identity](https://internetcomputer.org/internet-identity) (1), you - **and no one else** (including not Juno) - become the controller of your own [mission control] (2). This information is then sent back to your browser, where you can manage your modules (3).
diff --git a/docs/setup-the-sdk.md b/docs/setup-the-sdk.md
index 3ed27160..d64166f9 100644
--- a/docs/setup-the-sdk.md
+++ b/docs/setup-the-sdk.md
@@ -23,7 +23,7 @@ To add rich features to your web app, follow these steps to connect Juno and ena
:::info
-If you intend to use Juno solely for **[hosting](build/hosting.md)** purposes, you may skip the following steps.
+If you intend to use Juno solely for **[hosting](build/hosting.mdx)** purposes, you may skip the following steps.
:::
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md
index 9d8b9392..61ac9a23 100644
--- a/docs/troubleshooting.md
+++ b/docs/troubleshooting.md
@@ -16,7 +16,7 @@ We generally recommend using Static Site Generation (SSG) / prerendering.
### ENOENT: no such file or directory
-When encountering the following error after running `juno deploy`, it is likely caused by either not starting the command from the root directory of your project or having an incorrect configuration for the [source](./build/hosting.md#source) option, which Juno uses to locate the files for deployment.
+When encountering the following error after running `juno deploy`, it is likely caused by either not starting the command from the root directory of your project or having an incorrect configuration for the [source](./build/hosting.mdx#source) option, which Juno uses to locate the files for deployment.
> An unexpected error happened 😫. Error: ENOENT: no such file or directory, scandir ...
diff --git a/docusaurus.config.ts b/docusaurus.config.ts
index 02ade2e9..4c51b14f 100644
--- a/docusaurus.config.ts
+++ b/docusaurus.config.ts
@@ -66,7 +66,11 @@ const config: Config = {
docs: {
sidebarPath: "sidebars.ts",
editUrl: "https://github.com/junobuild/docs/edit/main/",
- exclude: ["**/miscellaneous/cli/**", "**/guides/components/**"]
+ exclude: [
+ "**/miscellaneous/cli/**",
+ "**/guides/components/**",
+ "**/build/components/**"
+ ]
},
blog: {
showReadingTime: true,
diff --git a/something.config.ts b/something.config.ts
new file mode 100644
index 00000000..f9b4bce8
--- /dev/null
+++ b/something.config.ts
@@ -0,0 +1,10 @@
+import { defineConfig } from "@junobuild/config";
+
+export default defineConfig({
+ satellite: {
+ id: "qsgjb-riaaa-aaaaa-aaaga-cai"
+ },
+ orbiter: {
+ id: "eeeee-fffff-ddddd-11111-cai"
+ }
+});