From fd12de9ebd7a75ca2f31e8b28bd2c5ac10c46e21 Mon Sep 17 00:00:00 2001 From: Dick Wolff Date: Wed, 13 Jan 2021 21:22:35 +0100 Subject: Improvements --- docs/configuration.md | 4 +++- docs/customservices.md | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 docs/customservices.md (limited to 'docs') diff --git a/docs/configuration.md b/docs/configuration.md index a43d7f1..6c6a444 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -7,7 +7,7 @@ Title, icons, links, colors, and services can be configured in the `config.yml` # Homepage configuration # See https://fontawesome.com/icons for icons options -# Optional: Use external configuration file. +# Optional: Use external configuration file. # Using this will ignore remaining config in this file # externalConfig: https://example.com/server-luci/config.yaml @@ -118,6 +118,8 @@ services: # background: red # optional color for card to set color directly without custom stylesheet ``` +View the (Custom Services)[customservices.md] file for details about all available custom services (like PiHole). + If you choose to fetch message information from an endpoint, the output format should be: ```json diff --git a/docs/customservices.md b/docs/customservices.md new file mode 100644 index 0000000..42bd87d --- /dev/null +++ b/docs/customservices.md @@ -0,0 +1,35 @@ +# Tips & Tricks + +Here is an overview of all custom services that are avaiable within Homer. + +## PiHole + +Using the PiHole service you can display info about your local PiHole instance right on your Homer dashboard. + +The following configuration is available for the PiHole service. + +``` + items: + - name: "Pi-hole" + logo: "assets/tools/sample.png" + # subtitle: "Network-wide Ad Blocking" # optional, if no subtitle is defined, PiHole statistics will be shown + url: "http://192.168.0.151/admin" + type: "PiHole" +``` + +## OpenWeatherMap + +Using the OpenWeatherMap service you can display weather information about a given location. + +The following configuration is available for the OpenWeatherMap service + +``` +items: + - name: "Weather" + url: "https://api.openweathermap.org/data/2.5/weather" + location: "Amsterdam" # your location. + apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api. + units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin. + background: "square" choose which type of background you want behind the image. Can be one of: square, cicle, none. Defaults to none. + type: "OpenWeather" +``` -- cgit v1.2.3 From dfb0b14626ccf42784d5e4c270ea0e2253db724c Mon Sep 17 00:00:00 2001 From: Dick Wolff Date: Wed, 13 Jan 2021 21:25:07 +0100 Subject: Fixed some typo's. --- docs/configuration.md | 2 +- docs/customservices.md | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/configuration.md b/docs/configuration.md index 6c6a444..174da4f 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -118,7 +118,7 @@ services: # background: red # optional color for card to set color directly without custom stylesheet ``` -View the (Custom Services)[customservices.md] file for details about all available custom services (like PiHole). +View the [Custom Services](customservices.md) file for details about all available custom services (like PiHole). If you choose to fetch message information from an endpoint, the output format should be: diff --git a/docs/customservices.md b/docs/customservices.md index 42bd87d..7c1818e 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -1,4 +1,4 @@ -# Tips & Tricks +# Custom Services Here is an overview of all custom services that are avaiable within Homer. @@ -25,11 +25,11 @@ The following configuration is available for the OpenWeatherMap service ``` items: - - name: "Weather" - url: "https://api.openweathermap.org/data/2.5/weather" - location: "Amsterdam" # your location. - apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api. - units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin. - background: "square" choose which type of background you want behind the image. Can be one of: square, cicle, none. Defaults to none. - type: "OpenWeather" + - name: "Weather" + url: "https://api.openweathermap.org/data/2.5/weather" + location: "Amsterdam" # your location. + apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api. + units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin. + background: "square" choose which type of background you want behind the image. Can be one of: square, cicle, none. Defaults to none. + type: "OpenWeather" ``` -- cgit v1.2.3 From 9e0ef05efe00ffd98ff6c7314a67e8a05505dcc4 Mon Sep 17 00:00:00 2001 From: Dick Wolff Date: Wed, 13 Jan 2021 21:27:19 +0100 Subject: Removed URL and made fixed. --- docs/configuration.md | 2 +- docs/customservices.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/configuration.md b/docs/configuration.md index 174da4f..c88069e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -118,7 +118,7 @@ services: # background: red # optional color for card to set color directly without custom stylesheet ``` -View the [Custom Services](customservices.md) file for details about all available custom services (like PiHole). +View [Custom Services](customservices.md) for details about all available custom services (like PiHole) and how to configure them. If you choose to fetch message information from an endpoint, the output format should be: diff --git a/docs/customservices.md b/docs/customservices.md index 7c1818e..a0b143e 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -1,6 +1,6 @@ # Custom Services -Here is an overview of all custom services that are avaiable within Homer. +Here is an overview of all custom services that are available within Homer. ## PiHole @@ -26,7 +26,6 @@ The following configuration is available for the OpenWeatherMap service ``` items: - name: "Weather" - url: "https://api.openweathermap.org/data/2.5/weather" location: "Amsterdam" # your location. apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api. units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin. -- cgit v1.2.3 From fb158d4767b85160c0c2c5fea5c6429c265576a9 Mon Sep 17 00:00:00 2001 From: Dick Wolff Date: Wed, 13 Jan 2021 22:19:17 +0100 Subject: Error handling and fixed link to city. --- docs/customservices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/customservices.md b/docs/customservices.md index a0b143e..d7c5212 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -29,6 +29,6 @@ items: location: "Amsterdam" # your location. apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api. units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin. - background: "square" choose which type of background you want behind the image. Can be one of: square, cicle, none. Defaults to none. + background: "square" # choose which type of background you want behind the image. Can be one of: square, cicle, none. Defaults to none. type: "OpenWeather" ``` -- cgit v1.2.3 From 97f0c43ccc724ec4502e55f73874a89f822f0a81 Mon Sep 17 00:00:00 2001 From: Dick Wolff Date: Thu, 28 Jan 2021 13:02:18 +0100 Subject: Added doc for locationID --- docs/customservices.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/customservices.md b/docs/customservices.md index d7c5212..40f2e3d 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -27,8 +27,12 @@ The following configuration is available for the OpenWeatherMap service items: - name: "Weather" location: "Amsterdam" # your location. + locationId: "2759794" # OpenWeatherMap city ID. apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api. units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin. background: "square" # choose which type of background you want behind the image. Can be one of: square, cicle, none. Defaults to none. type: "OpenWeather" ``` + +**Remarks:** +If for some reason your city can't be found by entering the name in the `location` property, you could also try to configure the OWM city ID in the `locationId` property. To retrieve your specific City ID, go to the [OWM website](https://openweathermap.org), search for your city and retrieve the ID from the URL (for example, the City ID of Amsterdam is 2759794). \ No newline at end of file -- cgit v1.2.3 From c3878bca0bbaa2dd076ef83bf46a051139d67426 Mon Sep 17 00:00:00 2001 From: Andreas Waschinski <25221082+waschinski@users.noreply.github.com> Date: Tue, 13 Jul 2021 19:16:15 +0200 Subject: Adding Mealie service --- docs/configuration.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'docs') diff --git a/docs/configuration.md b/docs/configuration.md index a472b41..dfe3761 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -167,3 +167,20 @@ In order to easily generate all required icon preset for the PWA to work, a tool ```bash npx vue-pwa-asset-generator -a {your_512x512_source_png} -o {your_output_folder} ``` + +### Supported services + +Currently the following services are supported for showing quick infos on the card. They can be used by setting the type to one of the following values at the item. + +- PiHole +- AdGuardHome +- PaperlessNG +- Mealie + +### Additional configuration + +#### Paperless +For Paperless you need an API-Key which you have to store at the item in the field `apikey`. + +#### Mealie +First off make sure to remove an existing `subtitle` as it will take precedence if set. Setting `type: "Mealie"` will then show the number of recipes Mealie is keeping organized. If you want the planned meal for today to be shown instead (and _only_ if one is planned of course) you will also have to set an API key in the field `apikey`. You can create such a key in your Mealie installation. -- cgit v1.2.3 From 4386cd094b4e7869a7fa5aad3a9df9cd1d282021 Mon Sep 17 00:00:00 2001 From: Andreas Waschinski <25221082+waschinski@users.noreply.github.com> Date: Wed, 28 Jul 2021 16:12:19 +0200 Subject: Updating configuration --- docs/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/configuration.md b/docs/configuration.md index dfe3761..f160ae0 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -183,4 +183,4 @@ Currently the following services are supported for showing quick infos on the ca For Paperless you need an API-Key which you have to store at the item in the field `apikey`. #### Mealie -First off make sure to remove an existing `subtitle` as it will take precedence if set. Setting `type: "Mealie"` will then show the number of recipes Mealie is keeping organized. If you want the planned meal for today to be shown instead (and _only_ if one is planned of course) you will also have to set an API key in the field `apikey`. You can create such a key in your Mealie installation. +First off make sure to remove an existing `subtitle` as it will take precedence if set. Setting `type: "Mealie"` will then show the number of recipes Mealie is keeping organized or the planned meal for today if one is planned. You will have to set an API key in the field `apikey` which can be created in your Mealie installation. -- cgit v1.2.3 From cb325bd58adcebeb106ccbfdf18b37fd19c8dcca Mon Sep 17 00:00:00 2001 From: Jeremy Meyers Date: Thu, 26 Aug 2021 21:54:59 -0400 Subject: typo --- docs/customservices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/customservices.md b/docs/customservices.md index 43f45f4..5778fad 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -50,4 +50,4 @@ For Paperless you need an API-Key which you have to store at the item in the fie ## Ping -For Paperless you need an API-Key which you have to store at the item in the field `apikey`. +For Ping you need an API-Key which you have to store at the item in the field `apikey`. -- cgit v1.2.3 From f11b1c9dcff418a2995a1089fa91fd9e44d6fe8b Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Mon, 13 Sep 2021 23:13:26 +0200 Subject: Weather service refactoring --- docs/customservices.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/customservices.md b/docs/customservices.md index 4f64ecc..150e232 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -23,14 +23,13 @@ The following configuration is available for the PiHole service. ## OpenWeatherMap Using the OpenWeatherMap service you can display weather information about a given location. - -The following configuration is available for the OpenWeatherMap service +The following configuration is available for the OpenWeatherMap service: ``` items: - name: "Weather" location: "Amsterdam" # your location. - locationId: "2759794" # OpenWeatherMap city ID. + locationId: "2759794" # Optional: Specify OpenWeatherMap city ID for better accuracy apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api. units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin. background: "square" # choose which type of background you want behind the image. Can be one of: square, cicle, none. Defaults to none. -- cgit v1.2.3 From 1d3287dcca801a000dbdb40ef20fd26a97ebb2e3 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Sat, 25 Sep 2021 12:12:22 +0200 Subject: Apply linters --- docs/configuration.md | 17 +++++++++-------- docs/customservices.md | 19 +++++++++---------- docs/development.md | 4 ++-- docs/tips-and-tricks.md | 18 +++++++++++++----- 4 files changed, 33 insertions(+), 25 deletions(-) (limited to 'docs') diff --git a/docs/configuration.md b/docs/configuration.md index 68711ec..d90981a 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,4 +1,4 @@ -## Configuration +# Configuration Title, icons, links, colors, and services can be configured in the `config.yml` file (located in `/assets` directory once built, or in the `public/assets` directory in development mode), using [yaml](http://yaml.org/) format. @@ -136,7 +136,6 @@ services: # background: red # optional color for card to set color directly without custom stylesheet ``` - View [Custom Services](customservices.md) for details about all available custom services (like PiHole) and how to configure them. If you choose to fetch message information from an endpoint, the output format should be as follows (or you can [custom map fields as shown in tips-and-tricks](./tips-and-tricks.md#mapping-fields)): @@ -152,7 +151,7 @@ If you choose to fetch message information from an endpoint, the output format s `null` value or missing keys will be ignored and value from the `config.yml` will be used if available. Empty values (either in `config.yml` or the endpoint data) will hide the element (ex: set `"title": ""` to hide the title bar). -### Style Options +## Style Options Homer uses [bulma CSS](https://bulma.io/), which provides a [modifiers syntax](https://bulma.io/documentation/modifiers/syntax/). You'll notice in the config there is a `tagstyle` option. It can be set to any of the bulma modifiers. You'll probably want to use one of these 4 main colors: @@ -163,7 +162,7 @@ Homer uses [bulma CSS](https://bulma.io/), which provides a [modifiers syntax](h You can read the [bulma modifiers page](https://bulma.io/documentation/modifiers/syntax/) for other options regarding size, style, or state. -### PWA Icons +## PWA Icons In order to easily generate all required icon preset for the PWA to work, a tool like [vue-pwa-asset-generator](https://www.npmjs.com/package/vue-pwa-asset-generator) can be used: @@ -171,7 +170,7 @@ In order to easily generate all required icon preset for the PWA to work, a tool npx vue-pwa-asset-generator -a {your_512x512_source_png} -o {your_output_folder} ``` -### Supported services +## Supported services Currently the following services are supported for showing quick infos on the card. They can be used by setting the type to one of the following values at the item. @@ -180,10 +179,12 @@ Currently the following services are supported for showing quick infos on the ca - PaperlessNG - Mealie -### Additional configuration +## Additional configuration + +### Paperless -#### Paperless For Paperless you need an API-Key which you have to store at the item in the field `apikey`. -#### Mealie +### Mealie + First off make sure to remove an existing `subtitle` as it will take precedence if set. Setting `type: "Mealie"` will then show the number of recipes Mealie is keeping organized or the planned meal for today if one is planned. You will have to set an API key in the field `apikey` which can be created in your Mealie installation. diff --git a/docs/customservices.md b/docs/customservices.md index 150e232..83d5f3e 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -1,7 +1,7 @@ # Custom Services Some service can use a specific a component that provides some extra features by adding a `type` key to the service yaml -configuration. Available services are in `src/components/`. Here is an overview of all custom services that are available +configuration. Available services are in `src/components/`. Here is an overview of all custom services that are available within Homer. ## PiHole @@ -10,7 +10,7 @@ Using the PiHole service you can display info about your local PiHole instance r The following configuration is available for the PiHole service. -``` +```yaml items: - name: "Pi-hole" logo: "assets/tools/sample.png" @@ -19,13 +19,12 @@ The following configuration is available for the PiHole service. type: "PiHole" ``` - ## OpenWeatherMap Using the OpenWeatherMap service you can display weather information about a given location. The following configuration is available for the OpenWeatherMap service: -``` +```yaml items: - name: "Weather" location: "Amsterdam" # your location. @@ -39,36 +38,36 @@ items: **Remarks:** If for some reason your city can't be found by entering the name in the `location` property, you could also try to configure the OWM city ID in the `locationId` property. To retrieve your specific City ID, go to the [OWM website](https://openweathermap.org), search for your city and retrieve the ID from the URL (for example, the City ID of Amsterdam is 2759794). - ## Medusa This service displays News (grey), Warning (orange) or Error (red) notifications bubbles from the Medusa application. Two lines are needed in the config.yml : -``` + +```yaml type: "Medusa" apikey: "01234deb70424befb1f4ef6a23456789" ``` + The url must be the root url of Medusa application. The Medusa API key can be found in General configuration > Interface. It is needed to access Medusa API. - ## Sonarr/Radarr This service displays Activity (blue), Warning (orange) or Error (red) notifications bubbles from the Radarr/Sonarr application. Two lines are needed in the config.yml : -``` + +```yaml type: "Radarr" or "Sonarr" apikey: "01234deb70424befb1f4ef6a23456789" ``` + The url must be the root url of Radarr/Sonarr application. The Radarr/Sonarr API key can be found in Settings > General. It is needed to access the API. - ## PaperlessNG For Paperless you need an API-Key which you have to store at the item in the field `apikey`. - ## Ping For Ping you need an API-Key which you have to store at the item in the field `apikey`. diff --git a/docs/development.md b/docs/development.md index f2e9020..5e432f1 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,4 +1,4 @@ -## Development +# Development ```sh # Using yarn (recommended) @@ -10,7 +10,7 @@ npm install npm run serve ``` -### Themes +## Themes Themes are meant to be simple customization (written in [scss](https://sass-lang.com/documentation/syntax)). To add a new theme, just add a file in the theme directory, and put all style in the `body #app.theme-` scope. Then import it in the main style file. diff --git a/docs/tips-and-tricks.md b/docs/tips-and-tricks.md index 94167fb..17bba9a 100644 --- a/docs/tips-and-tricks.md +++ b/docs/tips-and-tricks.md @@ -3,6 +3,7 @@ Here is a collection of neat tips and tricks that Homer users have come up with! ## Use Homer as a custom "new tab" page + #### `by @vosdev` These extensions for [Firefox](https://addons.mozilla.org/firefox/addon/custom-new-tab-page) and [Chrome & Friends](https://chrome.google.com/webstore/detail/new-tab-changer/occbjkhimchkolibngmcefpjlbknggfh) allow you to have your homer dashboard in your new tab page, while leaving focus on the address bar meaning you can still type right away if you want to search or go to a page that is not on your homer dash. @@ -22,11 +23,12 @@ The Firefox extension loads Homer in an iframe on your new tab page, meaning you ``` ## YAML Anchors + #### `by @JamiePhonic` Since Homer is configured using YAML, it supports all of YAML's helpful features, such as anchoring! -For example, you can define tags and tag styles for each "item" in a service. +For example, you can define tags and tag styles for each "item" in a service. Using Anchoring, you can define all your tags and their styles once like this: (for example) ```yaml @@ -70,6 +72,7 @@ The end result is that if you want to update the name or style of any particular Great if you have a lot of services or a lot of tags! ## Remotely edit your config with Code Server + #### `by @JamiePhonic` Homer doesn't yet provide a way to edit your configuration from inside Homer itself, but that doesn't mean it can't be done! @@ -78,14 +81,17 @@ You can setup and use [Code-Server](https://github.com/cdr/code-server) to edit If you're running Homer in docker, you can setup a Code-Server container and pass your homer config directory into it. Simply pass your homer config directory as an extra -v parameter to your code-server container: -``` + +```sh -v '/your/local/homer/config-dir/':'/config/homer':'rw' ``` + This will map your homer config directory (For example, /docker/appdata/homer/) into code-server's `/config/` directory, in a sub folder called `homer` As a bonus, Code-Server puts the "current folder" as a parameter in the URL bar, so you could add a `links:` entry in Homer that points to your code-server instance with the directory pre-filled for essentially 1 click editing! For example: + ```yml links: - name: Edit config @@ -93,9 +99,11 @@ links: url: https://vscode.example.net/?folder=/config/homer target: "_blank" # optional html tag target attribute ``` + where the path after `?folder=` is the path to the folder where you mounted your homer config INSIDE the Code-Server container. ### Example Code-Server docker create command + ```sh docker create \ --name=code-server \ @@ -111,13 +119,13 @@ docker create \ linuxserver/code-server ``` - ## Get the news headlines in Homer ### Mapping Fields + Most times, the url you're getting headlines from follows a different schema than the one expected by Homer. -For example, if you would like to show jokes from ChuckNorris.io, you'll find that the url https://api.chucknorris.io/jokes/random is giving you info like this: +For example, if you would like to show jokes from ChuckNorris.io, you'll find that the url is giving you info like this: ```json { @@ -179,6 +187,6 @@ If the URL you specified returns a JSON object that defines a `title` and `conte So, using [Node-Red](https://nodered.org/docs/getting-started/) and a quick flow, you can process an RSS feed to replace the message with a news item! -To get started, simply import [this flow](https://flows.nodered.org/flow/4b6406c9a684c26ace0430dd1826e95d) into your Node-Red instance and change the RSS feed in the "Get News RSS Feed" node to one of your choosing! +To get started, simply import [this flow](https://flows.nodered.org/flow/4b6406c9a684c26ace0430dd1826e95d) into your Node-Red instance and change the RSS feed in the "Get News RSS Feed" node to one of your choosing! So far, the flow has been tested with BBC News and Sky News, however it should be easy to modify the flow to work with other RSS feeds if they don't work out of the box! -- cgit v1.2.3 From 7129af3bda3a7a7d506bd8c8f122ad8995c2906c Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Sat, 25 Sep 2021 12:13:04 +0200 Subject: Add troubleshooting section --- docs/customservices.md | 2 ++ docs/troubleshooting.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 docs/troubleshooting.md (limited to 'docs') diff --git a/docs/customservices.md b/docs/customservices.md index 83d5f3e..4a023a1 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -4,6 +4,8 @@ Some service can use a specific a component that provides some extra features by configuration. Available services are in `src/components/`. Here is an overview of all custom services that are available within Homer. +If you experiencing any issue, please have a look to the [troubleshooting](troubleshooting.md) page. + ## PiHole Using the PiHole service you can display info about your local PiHole instance right on your Homer dashboard. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md new file mode 100644 index 0000000..ed1f85d --- /dev/null +++ b/docs/troubleshooting.md @@ -0,0 +1,19 @@ +# Troubleshooting + +## My custom service card doesn't work, nothing appears or offline status is displayed (pi-hole, sonarr, ping, ...) + +You might by facing a [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) (Cross Origin Request Sharing) issue. +It happens when the targeted service is hosted on a different domain or port. +Web browsers will not allow to fetch information from a different site without explicit permissions (the targeted service +must include a special `Access-Control-Allow-Origin: *` HTTP headers). +If this happens your web console (`ctrl+shit+i` or `F12`) will be filled with this kind of errors: + +```text +Access to fetch at 'https://' from origin 'https://' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. +``` + +To resolve this, you can either: + +* Host all your target service under the same domain & port. +* Modify the target sever configuration so that the response of the server included following header- `Access-Control-Allow-Origin: *` (). It might be an option in the targeted service, otherwise depending on how the service is hosted, the proxy or web server can seamlessly add it. +* Use a cors proxy sever like [`cors-container`](https://github.com/imjacobclark/cors-container), [`cors-anywhere`](https://github.com/Rob--W/cors-anywhere) or many others. -- cgit v1.2.3 From e58461ffe38cf38b6931f28d406e00daa8f7cd33 Mon Sep 17 00:00:00 2001 From: Sean Kelly Date: Wed, 6 Oct 2021 09:16:17 -0700 Subject: Update customservices readme for ping Fixes #249 Would be improved with https://github.com/bastienwirtz/homer/pull/255 --- docs/customservices.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/customservices.md b/docs/customservices.md index 4a023a1..a07e47c 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -72,4 +72,12 @@ For Paperless you need an API-Key which you have to store at the item in the fie ## Ping -For Ping you need an API-Key which you have to store at the item in the field `apikey`. +For Ping you need to set the type to Ping and provide a URL. +```yaml +items: + - name: "Awesome app" + type: Ping + logo: "assets/tools/sample.png" + subtitle: "Bookmark example" tag: "app" + url: "https://www.reddit.com/r/selfhosted/" +``` -- cgit v1.2.3 From b2f6da03829fb7cff4df3e2a9af5f6675fd0ae42 Mon Sep 17 00:00:00 2001 From: Sean Kelly Date: Wed, 6 Oct 2021 09:17:46 -0700 Subject: Cleanup --- docs/customservices.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/customservices.md b/docs/customservices.md index a07e47c..f79428f 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -72,7 +72,8 @@ For Paperless you need an API-Key which you have to store at the item in the fie ## Ping -For Ping you need to set the type to Ping and provide a URL. +For Ping you need to set the type to Ping and provide a url. + ```yaml items: - name: "Awesome app" -- cgit v1.2.3 From 2ca4faad9cb336ac8904bbc775fdcc2a12731b90 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Wed, 6 Oct 2021 22:55:09 +0200 Subject: Extendable base service for easier development. --- docs/development.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'docs') diff --git a/docs/development.md b/docs/development.md index 5e432f1..a22ae0b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,5 +1,7 @@ # Development +If you want to contribute to Homer, please read the [contributing guidelines](https://github.com/bastienwirtz/homer/blob/main/CONTRIBUTING.md) first. + ```sh # Using yarn (recommended) yarn install @@ -10,6 +12,49 @@ npm install npm run serve ``` +## Custom services + +Custom services are small VueJs component (see `src/components/services/`) that add little features to a classic, "static", dashboard item. It should be very simple. +A dashboard can contain a lot of items, so performance is very important. + +The [`Generic`](https://github.com/bastienwirtz/homer/blob/main/src/components/services/Generic.vue) service provides a typical card layout which +you can extend to add specific features. Unless you want a completely different design, extended the generic service is the recommended way. It gives you 3 [slots](https://vuejs.org/v2/guide/components-slots.html#Named-Slots) to extend: `icon`, `content` and `indicator`. +Each one is **optional**, and will display the usual information if omitted. + +Each service must implement the `item` [property](https://vuejs.org/v2/guide/components-props.html) and bind it the Generic component if used. + +### Skeleton +```Vue + + + +``` + + ## Themes Themes are meant to be simple customization (written in [scss](https://sass-lang.com/documentation/syntax)). -- cgit v1.2.3