📖 Home Assistant Companion docs
Go to file
Bruno Pantaleão Gonçalves 2a66d1dc2e
Update discord URL (#1147)
2024-12-16 11:53:38 +01:00
.devcontainer Change dev container name (#311) 2020-08-23 10:38:30 +01:00
.github Update dependabot.yml 2022-04-25 09:01:12 -07:00
.vscode Update Siri Shortcuts (#263) 2020-06-30 10:55:36 +01:00
docs Update discord URL (#1147) 2024-12-16 11:53:38 +01:00
src CarPlay documentation (#923) 2024-06-11 10:19:33 +02:00
static Add new watch configuration doc and rename "Actions" (#1104) 2024-09-16 19:45:30 +02:00
.gitignore Migrate to docusaurus V2 (#152) 2020-02-11 13:49:06 -08:00
.npmrc Enable devcontainer (#237) 2020-05-31 15:29:42 +01:00
.nvmrc Bump @docusaurus/core from 2.0.0-beta.20 to 2.0.0-beta.21 (#757) 2022-06-05 17:18:51 +01:00
CLA.md Initial commit 2019-04-24 21:56:57 -07:00
CODE_OF_CONDUCT.md Update Code of Conduct to 2.0 (#230) 2020-05-26 09:10:19 +02:00
LICENSE.md Initial commit 2019-04-24 21:56:57 -07:00
README.md Update App Store and devcontainer URLs (#938) 2023-04-15 17:19:08 +01:00
docusaurus.config.js Update discord link on footer (#1148) 2024-12-16 11:53:19 +01:00
netlify.toml Bump @docusaurus/core from 2.0.0-beta.9 to 2.0.0-beta.10 (#628) 2021-12-10 09:15:33 +00:00
package.json Bump react-dom from 17.0.2 to 18.3.1 (#1109) 2024-09-23 10:03:40 +02:00
sidebars.js CarPlay documentation (#923) 2024-06-11 10:19:33 +02:00
yarn.lock Bump nanoid from 3.3.6 to 3.3.8 (#1146) 2024-12-13 09:19:17 +01:00

README.md

License: CC BY-NC-SA 4.0 Netlify Status

Home Assistant Companion Documentation

This is the source for the Home Assistant Companion documentation.

Updating the docs

Documentation is built using Docusaurus.

Editing on GitHub

Small changes to text can be made directly on GitHub. At the bottom of each page there is an "Edit This Page" link which will load the document in GitHub ready for changes. This method doesn't easily allow for additional documents or images to be added.

Preparing a local environment

There are two options for developing the documentation on a local system.

Visual Studio Code and devcontainer

The easiest way to get started with development is to use Visual Studio Code with devcontainers. This approach will create a preconfigured development environment with all the tools you need. This approach is enabled for all Home Assistant repositories.

Prerequisites

More info about requirements and devcontainer in general

Getting started
  1. Fork the repository.
  2. Clone the repository to your computer.
  3. Open the repository using Visual Studio code.

When you open this repository with Visual Studio code you are asked to "Reopen in Container", this will start the build of the container.

If you don't see this notification, open the command palette and select Remote-Containers: Reopen Folder in Container.

Tasks

The devcontainter comes with some useful tasks to help you with development, you can start these tasks by opening the command palette and select Tasks: Run Task then select the task you want to run.

When a task is currently running (like Preview for the docs), it can be restarted by opening the command palette and selecting Tasks: Restart Running Task, then select the task you want to restart.

When using devcontainers and starting a preview via yarn start, script/setup or the Task in Code, a browser window will not be opened automatically, instead you will need to open a browser window to localhost:3000. If port 3000 was already in use, Docusaurus will use the next available port. You can check the port used in the terminal window of Visual Studio Code. Look for the line Project is running at http://0.0.0.0:XXXX/ where XXXX 3000 or greater, open a browser window to <http://localhost:XXXX>.

Setting Up Your Own Environment

Running the documentation locally requires NodeJS and Yarn to be installed. Inside a cloned fork of this repository, run:

$ script/setup

Or in Windows, just run:

yarn

This will install docusaurus amongst other things.

Running docs locally
$ script/server

In Windows, just run

yarn start

It will start a server at localhost:3000.

Adding a page

  • Create new page in docs/
  • Add new doc to sidebars.js