Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ web_modules/
.env
.env.*
!.env.example
!scripts/.env.publish-image.example

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ This site uses:

- **Next.js static export** — `next build` outputs static files to `out/`
- **Next.js `basePath`** — generates links and assets under `/docs/hardware`
- **Post-build nesting** — `scripts/nest-static-export.mjs` moves the export under `out/docs/hardware/` so Cloudflare static assets can serve it from the route prefix without custom Worker code
- **Post-build nesting** — `scripts/nest-static-export.mjs` moves the export under `out/docs/hardware/` so Cloudflare static assets can serve it from the route prefix
- **Worker script (`worker/index.ts`)** — thin `main` script in front of the static
assets. Almost every request is served by the `ASSETS` binding untouched
(`run_worker_first` defaults to `false`, so Cloudflare only invokes the Worker when no
static file matches). The one exception is `/docs/hardware/img/*`, which the Worker
answers directly from the shared R2 bucket (`IMAGES_BUCKET`) — see
[`scripts/README.md`](./scripts/README.md) for why docs content images are no longer
committed to this repo.

### Cloudflare build settings (Dashboard)

Expand All @@ -46,8 +53,11 @@ flowchart LR

subgraph Runtime_Request_Flow
U[Browser request] --> H[Cloudflare static asset route]
H --> J[Static asset lookup]
H -->|asset found| J[Static asset lookup]
H -->|no asset matches| K[worker/index.ts]
K -->|"/docs/hardware/img/*"| R[(R2: websites-images)]
J --> U
R --> U
end
```

Expand All @@ -73,6 +83,8 @@ Set this as a Cloudflare build variable so it is embedded into the static output
| `src/lib/source.ts` | Fumadocs source adapter |
| `src/lib/layout.shared.tsx` | Shared layout options (nav, logo) |
| `scripts/nest-static-export.mjs` | Moves static export under `/docs/hardware` |
| `worker/index.ts` | Worker script: falls back to `ASSETS`, proxies `/docs/hardware/img/*` from R2 |
| `scripts/publish-image.mjs` | Maintainer-only: uploads a docs image to R2 and purges its cache (see `scripts/README.md`) |

## Learn More

Expand Down
4 changes: 2 additions & 2 deletions content/docs/base-board/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Modular expansion board for S0 IoT Gateway

# S0 Base Board

![S0 Baseboard](../images/baseboard-front.png)
![S0 Baseboard](/img/baseboard-front.png)

The **S0 Base Board** is a modular expansion board designed to power and extend the functionality of the S0 compute module. It integrates critical components for industrial IoT and smart metering applications, making it ideal for professional deployments.

Expand Down Expand Up @@ -39,7 +39,7 @@ The Base Board transforms the S0 module into a complete gateway solution. The S0

## Getting Started

![Baseboard Labeled](../images/bb-label.png)
![Baseboard Labeled](/img/bb-label.png)

### Powering the Board

Expand Down
2 changes: 1 addition & 1 deletion content/docs/base-board/pinouts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: S0 Base Board pin assignments and header descriptions

# Base Board Pinouts

![Baseboard Pin Sockets](../images/baseboard-pinout.svg)
![Baseboard Pin Sockets](/img/baseboard-pinout.svg)

## DC Header Pinout (`J6`)

Expand Down
20 changes: 10 additions & 10 deletions content/docs/base-board/schematics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,30 @@ description: S0 Base Board circuit schematics and diagrams

## Ethernet Circuit

![W5500](../images/ethernet.png)
![W5500](/img/ethernet.png)

![Jack and Magnetics](../images/magneticsandjack.png)
![Jack and Magnetics](/img/magneticsandjack.png)

![Decoupling Caps](../images/decapseth.png)
![Decoupling Caps](/img/decapseth.png)

## M-Bus Circuit

![Wired M-Bus](../images/wiredmbus.png)
![Wired M-Bus](/img/wiredmbus.png)

## SD Card Circuit

![SD Card](../images/sdcard.png)
![SD Card](/img/sdcard.png)

## Board Frame and Connectors

![Board Frame](../images/baseframe.png)
![Board Frame](/img/baseframe.png)

![Board Headers](../images/baseconnectors.png)
![Board Headers](/img/baseconnectors.png)

## Power Circuitry

![Terminal Block and Battery Connector](../images/powerbase.png)
![Terminal Block and Battery Connector](/img/powerbase.png)

![Voltage Converters](../images/voltconvert.png)
![Voltage Converters](/img/voltconvert.png)

![Battery Charger](../images/battcharger.png)
![Battery Charger](/img/battcharger.png)
Binary file removed content/docs/images/arch.png
Binary file not shown.
Binary file removed content/docs/images/architecture.png
Binary file not shown.
Binary file removed content/docs/images/baseboard-front.png
Binary file not shown.
Binary file removed content/docs/images/baseboard-labeled.png
Binary file not shown.
Loading
Loading