From 218019d65e44cc1e27d70d8d36a015d747609ed7 Mon Sep 17 00:00:00 2001 From: Nitwel Date: Sun, 17 Mar 2024 00:50:41 +0100 Subject: [PATCH] add deploy steps for docs --- docs/.dockerignore | 2 ++ docs/.drone.yml | 16 ++++++++++++++++ docs/.gitignore | 3 ++- docs/.vitepress/data/sidebar.ts | 4 ++++ docs/Dockerfile | 19 +++++++++++++++++++ docs/development/event-system.md | 5 ++++- docs/development/functions.md | 20 ++++++++++++++++++++ docs/development/testing.md | 2 +- docs/index.md | 2 +- 9 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 docs/.dockerignore create mode 100644 docs/.drone.yml create mode 100644 docs/Dockerfile create mode 100644 docs/development/functions.md diff --git a/docs/.dockerignore b/docs/.dockerignore new file mode 100644 index 0000000..f52e6f5 --- /dev/null +++ b/docs/.dockerignore @@ -0,0 +1,2 @@ +node_modules +pnpm-lock.yaml \ No newline at end of file diff --git a/docs/.drone.yml b/docs/.drone.yml new file mode 100644 index 0000000..fcfc69c --- /dev/null +++ b/docs/.drone.yml @@ -0,0 +1,16 @@ +--- +kind: pipeline +type: docker +name: default + +steps: + - name: build + image: plugins/docker + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: nitwel/immersivehome-docs + tags: + - latest diff --git a/docs/.gitignore b/docs/.gitignore index 4e7bb84..d9cbf0c 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,3 +1,4 @@ reference/raw/ node_modules/ -.vitepress/cache/ \ No newline at end of file +.vitepress/cache/ +.vitepress/dist/ \ No newline at end of file diff --git a/docs/.vitepress/data/sidebar.ts b/docs/.vitepress/data/sidebar.ts index 78f5d5a..c468167 100644 --- a/docs/.vitepress/data/sidebar.ts +++ b/docs/.vitepress/data/sidebar.ts @@ -69,6 +69,10 @@ export default { { text: 'Event System', link: '/development/event-system' + }, + { + text: 'Node Functions', + link: '/development/functions' } ] } diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 0000000..b817930 --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,19 @@ +FROM node:18-alpine AS build + +WORKDIR /app + +COPY package.json . + +RUN npm install + +COPY . . + +RUN npm run generate +RUN npm run build + +FROM httpd:2.4 + +COPY --from=build /app/.vitepress/dist /usr/local/apache2/htdocs/ + +EXPOSE 80 + diff --git a/docs/development/event-system.md b/docs/development/event-system.md index 065ae42..0a7ee6f 100644 --- a/docs/development/event-system.md +++ b/docs/development/event-system.md @@ -6,4 +6,7 @@ Full reference can be found in the [Event System](/reference/lib--globals--event ## Focus handling -By default, every Node that has the `ui_focus` group is able to receive focus. When a node receives focus, the **_on_focus_in(event: [EventFocus](/reference/EventFocus.html))** method is called. When a node loses focus, the **_on_focus_out(event: [EventFocus](/reference/EventFocus.html))** method is called. \ No newline at end of file +By default, every Node that has the `ui_focus` group is able to receive focus. When a node receives focus, the **_on_focus_in(event: [EventFocus](/reference/EventFocus.html))** method is called. When a node loses focus, the **_on_focus_out(event: [EventFocus](/reference/EventFocus.html))** method is called. + +The `ui_focus_skip` group can be added to a node to skip focus when clicking on it. +The `ui_focus_stop` group prevents focus entirely on itself and its children. Useful for the Virtual Keyboard. \ No newline at end of file diff --git a/docs/development/functions.md b/docs/development/functions.md new file mode 100644 index 0000000..c552901 --- /dev/null +++ b/docs/development/functions.md @@ -0,0 +1,20 @@ +# Node Functions + +Node functions can be added to other Nodes to extend their functionality. + +## Available Functions + +### Clickable + +Access the events that pass through the node using signals. +Useful for connection to events that happen on other nodes. + +### Movable + +Adds the ability to move the node using the controller or hands. +The parent needs to be a `StaticBody3D`. + +### Occludable + +Hides the node when it is occluded by another node like walls. + diff --git a/docs/development/testing.md b/docs/development/testing.md index c5568c0..bfa977c 100644 --- a/docs/development/testing.md +++ b/docs/development/testing.md @@ -6,6 +6,6 @@ In order to test without a headset, press the run project (F5) button in Godot a ## With a VR Headset -To test the app with a VR headset, make sure you are able to export the project to Android. Follow the [Building](development/building.md) guide to setup the project for Android. +To test the app with a VR headset, make sure you are able to export the project to Android. Follow the [Building](/development/building) guide to setup the project for Android. When everything is setup correctly, you can connect your Headset to your computer and press the `Export with Remote Debug` button in Godot. This will start the app on your headset and connect the Godot Editor to the app. You can now see the logs and errors in the Godot Editor while the app is running on the headset. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index eaed84b..afa1528 100644 --- a/docs/index.md +++ b/docs/index.md @@ -59,7 +59,7 @@ The bottom right button on the keyboard will paste the copied text into the inpu ## What's next? -You successfully connected the app to Home Assistant. Next up you have to configure the rooms, read more about it in the [Room Setup](/room-setup) section. +You successfully connected the app to Home Assistant. Next up you have to configure the rooms, read more about it in the [Room Setup](/getting-started/room-setup) section. ::: warning Rooms have to be configured first, before you can add entities to them.