Documentation on documentation
Table of contents
Adding a new device
-
Create a markdown file with the extension
.mdindocs/_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_notesandnotesare arrays.manufacturer,name,model,imageand at least onebroadcasted_propertiesare required.broadcast_rate,active_scanandencryption_keyare “truthy” values and will appear for value other thanfalseornil.broadcasted_property_notesis a key/value array intended to provide addition information for individual properties.propertymust match a value inbroadcasted_properties.custom_firmwareis a key/value array wherenameis the name of the link andurlis 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_firmwareare 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.