Setting up a local environment to develop the documentation¶
Note
You should understand the github structure before attempting this, more info can be found here.
Forking the repo¶
To start off you will need to create your own fork of the documentation repo to track your changes. To do this go ahead and navigate to this repo. You will need to create a fork of this repo, a tutorial for this can be found here.
Disabling github actions¶
You will want to disable github actions so that nothing goes wrong. You can do that in the settings menu like this:
Settings --> Actions / General --> Disable actions --> save
Setting up the local branches¶
Now you will want to navigate to a directory on your pc for HASS.Agent, I will be using hass-agent
Clone the branches to each folder¶
Open a terminal in the hass-agent directory and clone your forked repo for the docs.
Setting up local environment¶
Docker Required
Docker is required to contribute to the documentation, you can get it here. You will also need the docker engine to be running whenever you want to edit the documentation.
Setup Docker¶
To setup the local docker environment all you need to do is run the following command:
This will build and setup the local docker environment and serve the docs with live reload. You can view this page at localhost:8000, any edits to files will cause it to rebuild automatically.
Further Reading¶
- Easy Editing – Simplest way to edit the documentation.
- Setup – Setup the local development environment.
- Development Lifecycle – Lifecycle of changes to the documentation.
- Editing Files – Overview of markdown features used for the docs, such as these cards.
- Adding Pages – Add new pages to the nav and sidebars.
- Special Files – For special pages and other files.