Developers website for Home Assistant.
Go to file
c0ffeeca7 8589e39d33
Add documentation about creating integration documentation (#2541)
* Add documentation about creating integration documentation

- showcases some documentation features such as glossary entries, My links, collapsible text, and reuse elements
- shows the documentation structure
- shows the example text from the integration quality scale

* Add section on reuse

* code fence to fix build error

* Remove links that no longer work after code fencing the rest of the text

* Rephrase

* Code fence elements to fix build

* Fix link

* Video: improve intro para

* Fix links

* Fix more links..

* Improve structure

- example text: add titles
- configuration section: add screenshots

* Structure list: add link to example text sections

* Attempt to fix build

* Attempt to fix build

* Fix list

* Fix header

* Revert heading level change

* remove example text and refer to template instead

* Update intro

* Update docs/documenting/lorem-ipsum.md

* Rename file name from lorem-ipsum to integration-docs-examples
2025-02-20 22:11:34 +01:00
.devcontainer Bump NodeJS to 18 (current LTS) (#1514) 2022-10-26 15:37:32 +02:00
.github Group @docusaurus/* updates (#2317) 2024-09-12 16:19:16 +02:00
.vscode Enable devcontainer (#490) 2020-05-03 23:13:16 +02:00
blog Document changed config entry state transitions (#2565) 2025-02-19 10:01:48 +01:00
docs Add documentation about creating integration documentation (#2541) 2025-02-20 22:11:34 +01:00
script Voice (#1620) 2023-01-10 08:38:17 -05:00
src Update old link in index.js (#2042) 2024-01-15 09:03:26 +01:00
static Add documentation about creating integration documentation (#2541) 2025-02-20 22:11:34 +01:00
.gitignore Ignore .idea files (#2234) 2024-07-01 12:57:31 +02:00
.npmrc Enable devcontainer (#490) 2020-05-03 23:13:16 +02:00
.nvmrc Update Docusaurus to v3 (#1995) 2024-06-08 10:38:41 +02:00
LICENSE.md Add LICENSE 2018-05-04 10:26:40 +02:00
README.md Update URLs in readme (#1760) 2023-04-29 10:36:48 +02:00
docusaurus.config.js Update logo (#1932) 2023-09-20 16:39:23 +02:00
netlify.toml Voice (#1620) 2023-01-10 08:38:17 -05:00
package.json Bump @easyops-cn/docusaurus-search-local from 0.48.4 to 0.48.5 (#2557) 2025-02-10 07:54:38 +01:00
sidebars.js Add documentation about creating integration documentation (#2541) 2025-02-20 22:11:34 +01:00
yarn.lock Bump serialize-javascript from 6.0.0 to 6.0.2 (#2571) 2025-02-18 08:20:32 +01:00

README.md

License: CC BY-NC-SA 4.0

Home Assistant Development Documentation

This is the source for the Home Assistant Development 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