From 04768dd0ee225de55e44356c91abadd8ea8a30cb Mon Sep 17 00:00:00 2001 From: Wendelin Peleska Date: Mon, 29 Apr 2024 21:09:30 +0200 Subject: [PATCH] 1.0.8 fix search in ingress --- homedocs/CHANGELOG.md | 4 ++++ homedocs/DOCS.md | 3 +++ homedocs/config.yaml | 2 +- homedocs/webserver/src/build.ts | 3 ++- homedocs/webserver/src/server.ts | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/homedocs/CHANGELOG.md b/homedocs/CHANGELOG.md index f2d7c1b..486e911 100644 --- a/homedocs/CHANGELOG.md +++ b/homedocs/CHANGELOG.md @@ -1,5 +1,9 @@ +## 1.0.8 + +- Fix search inside ingress + ## 1.0.7 - Fix navbar logo to PNG diff --git a/homedocs/DOCS.md b/homedocs/DOCS.md index b849ca7..24f7685 100644 --- a/homedocs/DOCS.md +++ b/homedocs/DOCS.md @@ -20,6 +20,9 @@ This addon helps you document stuff around your home inside home assistant in a 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. +__Each markdown file needs to have a frontmatter at the beginning of the file.__ +Checkout the examples. + #### 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. diff --git a/homedocs/config.yaml b/homedocs/config.yaml index ac12f2b..ea925a1 100644 --- a/homedocs/config.yaml +++ b/homedocs/config.yaml @@ -1,6 +1,6 @@ name: Homedocs description: Document stuff with Markdown based on Astro Starlight -version: "1.0.7" +version: "1.0.8" slug: homedocs init: false url: https://github.com/masterwendu/homeassistant-addons/tree/main/homedocs diff --git a/homedocs/webserver/src/build.ts b/homedocs/webserver/src/build.ts index 6c0e6ca..83df8aa 100644 --- a/homedocs/webserver/src/build.ts +++ b/homedocs/webserver/src/build.ts @@ -1,4 +1,5 @@ import { $, type ShellError } from 'bun' +import environmentVariables from './utils/environmentVariables' let buildRunning = false let buildQueued = false @@ -16,7 +17,7 @@ export const buildDocs = async () => { console.time('🚀 build runtime') try { console.log('🚀 build started') - await $`cd ../starlight && bun run build`.quiet() + await $`cd ../starlight && bun run build --base ${environmentVariables.ingressEntry}`.quiet() console.log('🚀 build finished') await $`rm -rf ./public` await $`cp -r ../starlight/dist ./public` diff --git a/homedocs/webserver/src/server.ts b/homedocs/webserver/src/server.ts index 80e3128..250a46f 100644 --- a/homedocs/webserver/src/server.ts +++ b/homedocs/webserver/src/server.ts @@ -11,7 +11,7 @@ export const startServer = async (port: number) => { ) .use( staticPlugin({ - // neccessary to use server outside of ingress too + // neccessary to use search in ingress prefix: environmentVariables.ingressEntry, }), )