Skip to content

Commit 9a35e4b

Browse files
committed
docs: use mdbook for documentation
1 parent 6eefdbd commit 9a35e4b

8 files changed

Lines changed: 131 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy mdbook
2+
on:
3+
push:
4+
# FIXME disabled for testing new feature branch!
5+
branches:
6+
- docs/mdbook
7+
# - main
8+
paths:
9+
- 'book.toml'
10+
- 'doc/**'
11+
- '.github/workflows/deploy_mdbook.yml'
12+
13+
jobs:
14+
deploy:
15+
name: Deploy mdbook
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write # To push a branch
19+
steps:
20+
- uses: actions/checkout@v5
21+
with:
22+
fetch-depth: 0
23+
- name: Install latest mdbook
24+
run: |
25+
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
26+
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
27+
mkdir mdbook
28+
curl -sSL $url | tar -xz --directory=./mdbook
29+
echo `pwd`/mdbook >> $GITHUB_PATH
30+
- name: Install mdbook mermaid extension
31+
run: |
32+
tag=v0.15.0
33+
url="https://github.com/badboy/mdbook-mermaid/releases/download/${tag}/mdbook-mermaid-${tag}-x86_64-unknown-linux-gnu.tar.gz"
34+
curl -sSL $url | tar -xz --directory=./mdbook
35+
36+
- name: Build Book
37+
run: mdbook build
38+
39+
- name: Deploy to GitHub Pages
40+
uses: JamesIves/github-pages-deploy-action@v4
41+
with:
42+
branch: gh-pages
43+
folder: book

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33

44
/dock-api/html/
55
/integration-api/html/
6+
7+
# mdbook output
8+
/book
9+
/mermaid-init.js
10+
/mermaid.min.js

book.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[book]
2+
authors = ["Markus Zehnder"]
3+
language = "en"
4+
src = "doc"
5+
title = "Unfolded Circle API Documentation"
6+
7+
[preprocessor]
8+
9+
[preprocessor.mermaid]
10+
command = "mdbook-mermaid"
11+
12+
[output]
13+
14+
[output.html]
15+
additional-js = ["mermaid.min.js", "mermaid-init.js"]

core-api/websocket/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
html

doc/SUMMARY.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Summary
2+
3+
[Introduction](README.md)
4+
5+
# User Guide
6+
7+
- [Remote Two user interface](remote-ui.md)
8+
- [Remote Two DNS-SD lookup](discovery.md)
9+
10+
# Bluetooth
11+
12+
- [Bluetooth HID peripheral support](bt/README.md)
13+
- [Restrictions and missing features](bt/TODO.md)
14+
- [Known issues](bt/known_issues.md)
15+
- [BT suspend / wakeup patterns](bt/suspend_behaviour.md)
16+
- [Virtual keyboard](bt/virtual_keyboard.md)
17+
- [Regular keycodes](bt/hid_keycodes.md)
18+
- [Consumer codes](bt/hid_consumer.md)
19+
- [System Controls](bt/hid_system_controls.md)
20+
- [BT device profiles](bt/profiles/README.md)
21+
- [Upload custom device profile](bt/profiles/upload.md)
22+
- [BT device test reports](bt/devices/README.md)
23+
- [Android](bt/devices/Android.md)
24+
- [AppleTV](bt/devices/AppleTV.md)
25+
- [Google Chromecast](bt/devices/Google-Chromecast.md)
26+
- [LG WebOS](bt/devices/LG-WebOS.md)
27+
- [onn. Streaming Device](bt/devices/onn-StreamingDevice.md)
28+
- [Samsung Smart Monitor](bt/devices/Samsung-SmartMonitor.md)
29+
30+
# Entity Documentation
31+
32+
- [Entities](entities/README.md)
33+
- [Button](entities/entity_button.md)
34+
- [Switch](entities/entity_switch.md)
35+
- [Climate](entities/entity_climate.md)
36+
- [Cover](entities/entity_cover.md)
37+
- [Light](entities/entity_light.md)
38+
- [Media Player](entities/entity_media_player.md)
39+
- [Remote](entities/entity_remote.md)
40+
- [Sensor](entities/entity_sensor.md)
41+
- [IR-Emitter](entities/entity_ir_emitter.md)
42+
43+
# Integration Drivers
44+
45+
- [Integration Drivers](integration-driver/README.md)
46+
- [Integration AsyncAPI YAML definition](../integration-api/UCR-integration-asyncapi.yaml)
47+
- [How to write an integration driver](integration-driver/write-integration-driver.md)
48+
- [WebSockets handling](integration-driver/websocket.md)
49+
- [Driver mDNS advertisement](integration-driver/driver-advertisement.md)
50+
- [Driver registration](integration-driver/driver-registration.md)
51+
- [Driver setup](integration-driver/driver-setup.md)
52+
- [Install integration driver on the device](integration-driver/driver-installation.md)

doc/bt/virtual_keyboard.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Virtual BLE Keyboard
2+
3+
The virtual keyboard defines the following HID report descriptors:
4+
5+
- [Regular keycodes (Keyboard Keypad Page (0x07))](hid_keycodes.md)
6+
- [Consumer codes (Consumer Page (0x0C))](hid_consumer.md)
7+
- [System Controls (Generic Desktop Page (0x01))](hid_system_controls.md)
8+
9+
The upper-case `Key name` in the above usage tables is used for the remote-entity commands.
10+
11+
HID key codes reference: <https://usb.org/sites/default/files/hut1_2.pdf>

dock-api/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
html

integration-api/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
html
2+
model
3+
*.html

0 commit comments

Comments
 (0)