Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
pull_request:
paths:
- book/**
- docs/**
- examples/endpoints_reference.rs
- src/endpoints.rs
- src/config.rs
Expand Down Expand Up @@ -46,6 +47,10 @@ jobs:
printf '\n.menu-title::after { content: "v%s"; }\n' "$VERSION" >> book/theme/torchio.css
grep -q "content: \"v$VERSION\"" book/theme/torchio.css

# the images are in docs/, where the README takes them from, and the pages use the same files
- name: Copy the images next to the pages
run: mkdir -p book/src/images && cp docs/* book/src/images/

- name: Write the reference of the endpoints from the catalog
run: cargo run --locked --example endpoints_reference > book/src/reference.md

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/.idea
/book/book
/book/src/reference.md
/book/src/images/
2 changes: 1 addition & 1 deletion book/src/control-panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
docker run -p 3000:3000 -e UI=1 altrdev/torchio:latest
```

![The torchio control panel: gauges with history for workers, memory, process RSS, disk, descriptors and requests, and a card for each test](https://raw.githubusercontent.com/altrdev/torchio/refs/heads/main/docs/ui.png)
![The torchio control panel: gauges with history for workers, memory, process RSS, disk, descriptors and requests, and a card for each test](images/ui.png)

The gauges and their history (the last 60 seconds) come from [`/info`](endpoints.md#info) and [`/metrics`](endpoints.md#metrics), refreshed every second, and the page shows whether `/ready` is answering `200` or `503`. Each card makes the request you see written under its sliders, and the answer goes in the log at the bottom, so it is also a way to learn the API. The history lives in the page: reloading it starts again.

Expand Down
3 changes: 2 additions & 1 deletion book/src/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ CI runs them on Linux and macOS with the format check, `clippy` and the document

## The documentation site

The pages are in `book/src`, written in Markdown, and `book/book.toml` and `book/theme` set the title and the colours. The reference of the endpoints is not written by hand: `cargo run --example endpoints_reference > book/src/reference.md` writes it from the catalog that `/help` is built from, so it is always right. With [mdBook](https://rust-lang.github.io/mdBook/) installed:
The pages are in `book/src`, written in Markdown, and `book/book.toml` and `book/theme` set the title and the colours. The images are in `docs/`, where the README takes them from, and the second command below copies them next to the pages. The reference of the endpoints is not written by hand: `cargo run --example endpoints_reference > book/src/reference.md` writes it from the catalog that `/help` is built from, so it is always right. With [mdBook](https://rust-lang.github.io/mdBook/) installed:

```
cargo run --example endpoints_reference > book/src/reference.md
mkdir -p book/src/images && cp docs/* book/src/images/
mdbook serve book --open
python3 book/check-links.py book/book # after mdbook build book
```
Expand Down
10 changes: 0 additions & 10 deletions book/src/images/logo.svg

This file was deleted.

Binary file removed book/src/images/social-preview.png
Binary file not shown.
2 changes: 1 addition & 1 deletion book/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

*Torchio* is the Italian word for the press that squeezes wine and oil, as in *mettere sotto torchio*: to put under pressure. Put your containers under the press. It began in 2019 as `high-cpu-node`, when it could only burn CPU.

![torchio watch: gradient bars and history of busy workers, held memory, process RSS and held disk, while keys start a memory test, a CPU burn and a leak](https://raw.githubusercontent.com/altrdev/torchio/refs/heads/main/docs/watch.svg)
![torchio watch: gradient bars and history of busy workers, held memory, process RSS and held disk, while keys start a memory test, a CPU burn and a leak](images/watch.svg)

This is the documentation of torchio {{#include version.md}}. The changes of each release are in the [changelog](changelog.md).

Expand Down
Loading