From 5ec121d0703b98a4a85770c3e28e0cdf4d6ba08b Mon Sep 17 00:00:00 2001 From: Exelo Date: Sat, 7 Nov 2026 00:24:53 +0100 Subject: [PATCH 1/2] docs: own the loader folder of the docs site with an explicit navigation --- .github/nanoforge.json | 2 +- docs/docs/{loader/2-client.mdx => client.mdx} | 0 docs/docs/navigation.json | 1 + docs/docs/{loader/1-overview.mdx => overview.mdx} | 6 +++--- docs/docs/{loader/4-server.mdx => server.mdx} | 0 docs/docs/{loader/3-website.mdx => website.mdx} | 0 6 files changed, 5 insertions(+), 4 deletions(-) rename docs/docs/{loader/2-client.mdx => client.mdx} (100%) create mode 100644 docs/docs/navigation.json rename docs/docs/{loader/1-overview.mdx => overview.mdx} (93%) rename docs/docs/{loader/4-server.mdx => server.mdx} (100%) rename docs/docs/{loader/3-website.mdx => website.mdx} (100%) diff --git a/.github/nanoforge.json b/.github/nanoforge.json index d17f5a5..450e0c2 100644 --- a/.github/nanoforge.json +++ b/.github/nanoforge.json @@ -13,5 +13,5 @@ "commitFormat": "chore: release @nanoforge-dev/loader@{version}" } ], - "docs": { "category": "cli" } + "docs": { "category": "loader" } } diff --git a/docs/docs/loader/2-client.mdx b/docs/docs/client.mdx similarity index 100% rename from docs/docs/loader/2-client.mdx rename to docs/docs/client.mdx diff --git a/docs/docs/navigation.json b/docs/docs/navigation.json new file mode 100644 index 0000000..35916b4 --- /dev/null +++ b/docs/docs/navigation.json @@ -0,0 +1 @@ +["overview", "client", "website", "server"] diff --git a/docs/docs/loader/1-overview.mdx b/docs/docs/overview.mdx similarity index 93% rename from docs/docs/loader/1-overview.mdx rename to docs/docs/overview.mdx index 0c03bab..73dce9e 100644 --- a/docs/docs/loader/1-overview.mdx +++ b/docs/docs/overview.mdx @@ -40,15 +40,15 @@ npx loader-server --dir .nanoforge/server ## Packages - + Bun HTTP server that serves the loader website and the compiled client game files. Exposes the manifest, environment variables, and game assets. Supports HTTPS and hot-reload. - + Browser application bundled as static assets. Displays the loading screen, downloads and caches game files via the browser Origin Private File System, then bootstraps the game. - + Bun process that runs the server-side game code in an isolated worker process. Supports live-reload by restarting the worker on file changes. diff --git a/docs/docs/loader/4-server.mdx b/docs/docs/server.mdx similarity index 100% rename from docs/docs/loader/4-server.mdx rename to docs/docs/server.mdx diff --git a/docs/docs/loader/3-website.mdx b/docs/docs/website.mdx similarity index 100% rename from docs/docs/loader/3-website.mdx rename to docs/docs/website.mdx From ff19f739690bbb31b095aa36a6ee94b542c4281a Mon Sep 17 00:00:00 2001 From: Exelo Date: Sat, 7 Nov 2026 00:40:26 +0100 Subject: [PATCH 2/2] docs: drop the mintlify/components imports, mintlify components are global --- docs/docs/client.mdx | 2 -- docs/docs/overview.mdx | 2 -- docs/docs/server.mdx | 2 -- docs/docs/website.mdx | 2 -- 4 files changed, 8 deletions(-) diff --git a/docs/docs/client.mdx b/docs/docs/client.mdx index 5443bdb..1dca4f6 100644 --- a/docs/docs/client.mdx +++ b/docs/docs/client.mdx @@ -3,8 +3,6 @@ title: Client description: Bun HTTP server that serves the browser-side of a NanoForge project --- -import { Tooltip } from "mintlify/components"; - ## Overview `loader-client` is a Bun HTTP server that bridges the browser and the compiled game client. It serves the `loader-website` frontend, exposes the game file manifest, delivers the compiled game assets, and forwards environment variables to the browser. It is the single entry point for everything the player's browser contacts. diff --git a/docs/docs/overview.mdx b/docs/docs/overview.mdx index 73dce9e..bbe2794 100644 --- a/docs/docs/overview.mdx +++ b/docs/docs/overview.mdx @@ -3,8 +3,6 @@ title: Loader description: Overview of the @nanoforge-dev/loader packages --- -import { Card, CardGroup } from "mintlify/components"; - ## What is the Loader? The NanoForge Loader is the runtime layer that starts a NanoForge project. It is invoked by the [NanoForge CLI](https://github.com/NanoForge-dev/CLI) when you run `nf start`, and handles both sides of a game simultaneously: the **client side** delivered to the browser and the **server side** running in Bun. diff --git a/docs/docs/server.mdx b/docs/docs/server.mdx index a9af398..55320f1 100644 --- a/docs/docs/server.mdx +++ b/docs/docs/server.mdx @@ -3,8 +3,6 @@ title: Server description: Bun process that runs the server-side game code of a NanoForge project --- -import { Tooltip } from "mintlify/components"; - ## Overview `loader-server` is a Bun process that runs the compiled server-side game code. It scans a built game directory, locates `/main.js`, then forks an isolated child process — the worker — that loads the game and calls its exported `main()` function. The parent process manages the worker lifecycle and restarts it when files change in watch mode. diff --git a/docs/docs/website.mdx b/docs/docs/website.mdx index 43a4d3b..8c66062 100644 --- a/docs/docs/website.mdx +++ b/docs/docs/website.mdx @@ -3,8 +3,6 @@ title: Website description: Browser application that loads and bootstraps a NanoForge game --- -import { Tooltip } from "mintlify/components"; - ## Overview `loader-website` is a browser application (HTML + TypeScript) bundled as static assets and served by `loader-client`. It is the loading screen the player sees before the game starts. It fetches the game's file list from the server, downloads and caches each file locally in the browser, then dynamically imports the game entry point and starts it.