Skip to content

Commit 8001cdd

Browse files
committed
chore(Docs): use material for mkdocs for documentation
1 parent aa8b464 commit 8001cdd

File tree

17 files changed

+717
-452
lines changed

17 files changed

+717
-452
lines changed

.github/workflows/docs.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "📄 Documentation"
2+
on:
3+
push:
4+
branches:
5+
- main
6+
permissions:
7+
contents: write
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Configure Git Credentials
14+
run: |
15+
git config user.name github-actions[bot]
16+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: 3.x
20+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
21+
- uses: actions/cache@v4
22+
with:
23+
key: mkdocs-material-${{ env.cache_id }}
24+
path: ~/.cache
25+
restore-keys: |
26+
mkdocs-material-
27+
- run: pip install mkdocs-material
28+
- run: mkdocs gh-deploy --force

Makefile

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -214,26 +214,30 @@ dbus-xml: ## Generate DBus XML spec from running InputPlumber
214214
busctl introspect org.shadowblip.InputPlumber \
215215
--xml-interface /org/shadowblip/InputPlumber/devices/source/hidraw0 > ./bindings/dbus-xml/org.shadowblip.Input.Source.HIDRawDevice.xml
216216

217-
XSL_TEMPLATE := ./docs/dbus2markdown.xsl
217+
XSL_TEMPLATE := ./docs/dbus-interface/dbus2markdown.xsl
218218
.PHONY: docs
219219
docs: ## Generate markdown docs for DBus interfaces
220220
mkdir -p docs
221-
xsltproc --novalid -o docs/manager.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Manager.xml
222-
sed -i 's/DBus Interface API/Manager DBus Interface API/g' ./docs/manager.md
223-
xsltproc --novalid -o docs/composite_device.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.CompositeDevice.xml
224-
sed -i 's/DBus Interface API/CompositeDevice DBus Interface API/g' ./docs/composite_device.md
225-
xsltproc --novalid -o docs/target_dbus.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.DBusDevice.xml
226-
sed -i 's/DBus Interface API/DBusDevice DBus Interface API/g' ./docs/target_dbus.md
227-
xsltproc --novalid -o docs/target_keyboard.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Keyboard.xml
228-
sed -i 's/DBus Interface API/Keyboard DBus Interface API/g' ./docs/target_keyboard.md
229-
xsltproc --novalid -o docs/target_mouse.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Mouse.xml
230-
sed -i 's/DBus Interface API/Mouse DBus Interface API/g' ./docs/target_mouse.md
231-
xsltproc --novalid -o docs/target_gamepad.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Gamepad.xml
232-
sed -i 's/DBus Interface API/Gamepad DBus Interface API/g' ./docs/target_gamepad.md
233-
xsltproc --novalid -o docs/source_event_device.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Source.EventDevice.xml
234-
sed -i 's/DBus Interface API/Source EventDevice DBus Interface API/g' ./docs/source_event_device.md
235-
xsltproc --novalid -o docs/source_hidraw_device.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Source.HIDRawDevice.xml
236-
sed -i 's/DBus Interface API/Source HIDRaw DBus Interface API/g' ./docs/source_hidraw_device.md
221+
xsltproc --novalid -o docs/dbus-interface/manager.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Manager.xml
222+
sed -i 's/DBus Interface API/Manager DBus Interface API/g' ./docs/dbus-interface/manager.md
223+
xsltproc --novalid -o docs/dbus-interface/composite_device.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.CompositeDevice.xml
224+
sed -i 's/DBus Interface API/CompositeDevice DBus Interface API/g' ./docs/dbus-interface/composite_device.md
225+
xsltproc --novalid -o docs/dbus-interface/target_dbus.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.DBusDevice.xml
226+
sed -i 's/DBus Interface API/DBusDevice DBus Interface API/g' ./docs/dbus-interface/target_dbus.md
227+
xsltproc --novalid -o docs/dbus-interface/target_keyboard.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Keyboard.xml
228+
sed -i 's/DBus Interface API/Keyboard DBus Interface API/g' ./docs/dbus-interface/target_keyboard.md
229+
xsltproc --novalid -o docs/dbus-interface/target_mouse.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Mouse.xml
230+
sed -i 's/DBus Interface API/Mouse DBus Interface API/g' ./docs/dbus-interface/target_mouse.md
231+
xsltproc --novalid -o docs/dbus-interface/target_gamepad.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Gamepad.xml
232+
sed -i 's/DBus Interface API/Gamepad DBus Interface API/g' ./docs/dbus-interface/target_gamepad.md
233+
xsltproc --novalid -o docs/dbus-interface/source_event_device.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Source.EventDevice.xml
234+
sed -i 's/DBus Interface API/Source EventDevice DBus Interface API/g' ./docs/dbus-interface/source_event_device.md
235+
xsltproc --novalid -o docs/dbus-interface/source_hidraw_device.md $(XSL_TEMPLATE) ./bindings/dbus-xml/org.shadowblip.Input.Source.HIDRawDevice.xml
236+
sed -i 's/DBus Interface API/Source HIDRaw DBus Interface API/g' ./docs/dbus-interface/source_hidraw_device.md
237+
238+
.PHONY: docs-preview
239+
docs-preview: ## Run mkdocs to view documentation
240+
mkdocs serve
237241

238242
# Refer to .releaserc.yaml for release configuration
239243
.PHONY: sem-release

0 commit comments

Comments
 (0)