Documentation on documentation
Table of contents
Adding a new device
-
Create a markdown file with the extension
.md
indocs/_devices/
. -
Add an image of the device and place it under
docs/_assets/images
. -
Copy and paste the following template into the markdown file. Fill in the relevant information.
---
manufacturer:
name:
model:
image:
physical_description:
broadcasted_properties:
- EXAMPLE
broadcasted_property_notes:
- property: EXAMPLE
note: EXAMPLE
broadcast_rate:
active_scan:
encryption_key:
custom_firmware:
- name: EXAMPLE
url: EXAMPLE
notes:
- EXAMPLE
---
- Every instance of EXAMPLE is a place filler and is intended to be removed or placed with relevant information.
- While the file ends in md and is treated as markdown, the syntax between the start and end
---
is YAML (explained here) broadcasted_properties
,broadcasted_property_notes
andnotes
are arrays.manufacturer
,name
,model
,image
and at least onebroadcasted_properties
are required.broadcast_rate
,active_scan
andencryption_key
are “truthy” values and will appear for value other thanfalse
ornil
.broadcasted_property_notes
is a key/value array intended to provide addition information for individual properties.property
must match a value inbroadcasted_properties
.custom_firmware
is a key/value array wherename
is the name of the link andurl
is the url of the firmware.
- When the theme is regenerated, the new device should appear in the relative “Supported Devices”.
Local development
The quickest and easiest way to serve the site locally is to use https://github.com/BretFisher/jekyll-serve
cd docs
docker run --rm -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve
When plugin installation is complete, open a browser to http://0.0.0.0:4000/ble_monitor/
Notes about theme being used.
- Values are displayed through the device HTML template,
docs/_includes/device.html
- Additional notes can be added below the block of properties.
- Additional properties can be added as needed. Simply add to the property to each device markdown file and display it accordingly in the template.
physical_description
,broadcast_rate
,active_scan
,encryption_key
,custom_firmware
are hidden when the value is false.
A few modifications were make to the standard navigation found in the Just-the-docs theme. This is to show the child pages under “Supported Devices” at all times.
- Table of content generation uses a modified version of allejo/jekyll-toc v1.1.0.