Add docs how to dev

This commit is contained in:
Paulus Schoutsen 2018-05-08 16:25:26 -04:00
parent 1902984dc7
commit 2c726962e8
4 changed files with 37 additions and 0 deletions

View File

@ -3,3 +3,26 @@
# Home Assistant Development Documentation
This is the source for the [Home Assistant Development documentation](https://developers.home-assistant.io).
## Updating the docs
Documentation is build using [Docusaurus](https://docusaurus.io/docs/en/doc-markdown.html).
### Preparing environment
Running the documentation locally requires [NodeJS](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/) to be installed. Inside a cloned fork of this repository, run `script/setup`.
### Running docs locally
```bash
script/server
```
It will start a server at [localhost:3000](http://localhost:3000).
### Adding a page
- Create new page in `docs/`
- Add new doc to `website/sidebars.json`
You will need to restart the server when creating a new file or make changes to `sidebars.json`. If you're updating a document, you will only need to refresh your browser to get the latest changes.

6
script/bootstrap Executable file
View File

@ -0,0 +1,6 @@
set -e
cd "$(dirname "$0")/.."
cd website
yarn

6
script/server Executable file
View File

@ -0,0 +1,6 @@
set -e
cd "$(dirname "$0")/.."
cd website
yarn start

View File

@ -54,6 +54,8 @@
"Sensor": "Sensor",
"entity_switch": "Switch Entity",
"Switch": "Switch",
"entity_weather": "Weather Entity",
"Weather": "Weather",
"external_api_rest_python": "REST API - Python bindings",
"external_api_rest": "RESTful API",
"external_api_server_sent_events": "Server-sent events",