From 2c726962e805e57ba8a62b409f316b73a3a488cf Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 8 May 2018 16:25:26 -0400 Subject: [PATCH] Add docs how to dev --- README.md | 23 +++++++++++++++++++++++ script/bootstrap | 6 ++++++ script/server | 6 ++++++ website/i18n/en.json | 2 ++ 4 files changed, 37 insertions(+) create mode 100755 script/bootstrap create mode 100755 script/server diff --git a/README.md b/README.md index 5488e760..27b05005 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/script/bootstrap b/script/bootstrap new file mode 100755 index 00000000..f31cca06 --- /dev/null +++ b/script/bootstrap @@ -0,0 +1,6 @@ +set -e + +cd "$(dirname "$0")/.." + +cd website +yarn diff --git a/script/server b/script/server new file mode 100755 index 00000000..4a03eca1 --- /dev/null +++ b/script/server @@ -0,0 +1,6 @@ +set -e + +cd "$(dirname "$0")/.." + +cd website +yarn start diff --git a/website/i18n/en.json b/website/i18n/en.json index f8b1b0c9..922b00fe 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -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",