Skip to content

Commit 8a72917

Browse files
committed
Add more details, add updates and link to external docs
1 parent f254ff6 commit 8a72917

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

source/developers/website.markdown

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To test your changes locally, you need to install **Ruby** and its dependencies
2323
- Install `bundler`, a dependency manager for Ruby: `$ gem install bundler`
2424
- In your home-assistant.github.io root directory, run `$ bundle` to install the gems you need.
2525

26-
Short cut for Fedora: `$ sudo dnf -y install gcc-c++ ruby ruby-devel rubygem-bundler && bundle`
26+
Short cut for Fedora: `$ sudo dnf -y install gcc-c++ ruby ruby-devel rubygem-bundler rubygem-json && bundle`
2727

2828
Then you can work on the documentation:
2929

@@ -73,20 +73,42 @@ A couple of points to remember:
7373
- Document the needed steps to retrieve API keys or access token for the third party service or device if needed.
7474
- Keep the configuration sample minimal by only adding the `Required` options. Full configuration details with further explanations should go into a seperate section.
7575
- The description of all the configuration variables should contains information about the used defaults.
76-
- If you're adding a new component, for the `ha_release` part of the header, just increment off the current release. If the current release is 0.37, make `ha_release` 0.38.
76+
- If you're adding a new component, for the `ha_release` part of the header, just increment of the current release. If the current release is 0.37, make `ha_release` 0.38. If it's 0.30 or 0.40 please quote it with `" "`.
7777

78-
### {% linkable_title Embedding Code %}
78+
### {% linkable_title Configuration variables %}
79+
80+
The ***Configuration Variables*** section must use the {% raw %}`{% configuration %} ... {% endconfiguration %}`{% endraw %} tag.
7981

80-
You can use the default markdown syntax to generate syntax highlighted code. For inline code wrap your code in \`. For multi-line, syntax wrap your code as shown below.
8182

8283
```text
83-
{% raw %} ```yaml
84-
sensor:
85-
platform: template
86-
```{% endraw %}
84+
{% raw %}
85+
{% configuration %}
86+
api_key:
87+
description: The API key to access the service.
88+
required: true
89+
type: string
90+
name:
91+
description: Name to use in the frontend.
92+
required: false
93+
type: string
94+
{% endconfiguration %}
95+
{% endraw %}
96+
```
97+
98+
- **`description:`**: That the variable is about.
99+
- **`required:`**: If the variable is required.
100+
```text
101+
required: true #=> Required
102+
required: false #=> Optional
103+
required: inclusive #=> Inclusive
104+
required: exclusive #=> Exclusive
105+
required: any string here #=> Any string here
87106
```
107+
- **`type:`**: The type of the variable. Allowed entries: `string`, `int` or `map`. For multiple possibilities use `[string, int]`. If you use `map` then you need to define `keys:` (see the [`template` sensor](/components/sensor.template/) for an example).
108+
109+
### {% linkable_title Embedding Code %}
88110

89-
Note that you can replace `yaml` next to \`\`\` with the language that is within the block.
111+
You can use the [default markdown syntax](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code) to generate syntax highlighted code. For inline code wrap your code in {% raw %}`{% endraw %}.
90112

91113
When you're writing code that is to be executed on the terminal, prefix it with `$`.
92114

@@ -109,7 +131,7 @@ The direct usage of HTML is supported but not recommended. The note boxes are an
109131
### {% linkable_title Redirects %}
110132
If you rename or move an existing platform or component, create the redirect. Add the old location of the page to the header of the new one.
111133

112-
```test
134+
```text
113135
---
114136
...
115137
redirect_from: /getting-started/android/

0 commit comments

Comments
 (0)