generated from home-assistant/addons-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
917 additions
and
229 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[tools] | ||
node = "20" | ||
bun = "1.1.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- https://developers.home-assistant.io/docs/add-ons/presentation#keeping-a-changelog --> | ||
|
||
## 1.0.0 | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Home Assistant Add-on: Homedocs | ||
|
||
This addon helps you document stuff around your home inside home assistant in a nice way. | ||
|
||
## How to use | ||
|
||
1. Install the addon | ||
2. Start the addon | ||
3. the addon creates a folder called `homedocs` in your config folder | ||
4. the addon copies some sample data to this folder | ||
5. edit the markdown files in the `homedocs` folder | ||
- in the `content/docs` folder you can write your documentation | ||
- all images should be placed in the `assets` folder | ||
- the will be automatically optimized by astro | ||
6. The addon will recognize the changes and build the site after a give timeout (60 seconds is default) | ||
- the timeout is needed because the build takes some time and can just runs once in parallel. | ||
7. open the webui to see your beautiful documentation | ||
|
||
### how to edit the documentation | ||
|
||
The documentation lies in your `config` directory under `homedocs`. When you edit or add/remove the markdown files, your changes will be build after the build timeout and you will see the changes inside the webui. | ||
|
||
#### Use the Studio Code Server addon | ||
|
||
I recommend to use the [Studio Code Server](https://github.com/hassio-addons/addon-vscode) to edit your documentation, because it is very convenient to edit markdown files with it and you can just drag and drop files into the addon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
ARG BUILD_FROM | ||
FROM $BUILD_FROM | ||
|
||
# Install requirements for add-on | ||
RUN apk add --update --no-cache nodejs npm bash ca-certificates wget | ||
# Install glibc to run Bun | ||
RUN if [[ $(uname -m) == "aarch64" ]] ; \ | ||
then \ | ||
# aarch64 | ||
wget https://raw.githubusercontent.com/squishyu/alpine-pkg-glibc-aarch64-bin/master/glibc-2.26-r1.apk ; \ | ||
apk add --no-cache --allow-untrusted --force-overwrite glibc-2.26-r1.apk ; \ | ||
rm glibc-2.26-r1.apk ; \ | ||
else \ | ||
# x86_64 | ||
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk ; \ | ||
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub ; \ | ||
apk add --no-cache --force-overwrite glibc-2.28-r0.apk ; \ | ||
rm glibc-2.28-r0.apk ; \ | ||
fi | ||
|
||
# Install Bun | ||
RUN npm install -g bun | ||
|
||
# Copy starlight data | ||
COPY starlight /starlight | ||
WORKDIR /starlight | ||
RUN bun install | ||
|
||
# copy and setup webserver | ||
COPY webserver/dist/index.js /webserver/index.js | ||
COPY webserver/src/templates /webserver/templates | ||
RUN mkdir -p /webserver/public | ||
|
||
# copy and setup run script | ||
COPY run.sh / | ||
RUN chmod a+x /run.sh | ||
|
||
# Disable astro telemetry | ||
RUN bunx astro telemetry disable | ||
|
||
WORKDIR /webserver | ||
|
||
CMD [ "/run.sh" ] |
Oops, something went wrong.