Documentation: doc updates for nesting, reorganizing, fixes

This commit is contained in:
shamoon 2024-11-27 22:49:14 -08:00
parent 6d829bce79
commit e626274f34
No known key found for this signature in database
13 changed files with 132 additions and 92 deletions

View file

@ -50,7 +50,7 @@ You can also pass API keys from the widget configuration to the proxy handler, f
### `credentialedProxyHandler`
A proxy handler that makes authenticated by setting request headers. Credentials are pulled from the widgets configuration.
A proxy handler that makes authenticated requests by setting request headers. Credentials are pulled from the widgets configuration.
By default the key is passed as an `X-API-Key` header. If you need to pass the key as something else, either add a case to the credentialedProxyHandler or create a new proxy handler.

View file

@ -28,6 +28,8 @@ Service widgets are used to display the status of a service, often a web service
slug: aaaaaaabbbbb
```
More detail on configuring service widgets can be found in the [Service Widgets Config](../configs/services.md) section.
## Info Widgets
Info widgets are used to display information in the header, often about your system or environment. Info widgets are defined your `widgets.yaml` file. Here's an example:
@ -39,3 +41,5 @@ Info widgets are used to display information in the header, often about your sys
longitude: -117.51
cache: 5
```
More detail on configuring info widgets can be found in the [Info Widgets Config](../configs/info-widgets.md) section.

View file

@ -3,7 +3,7 @@ title: Open-Meteo
description: Open-Meteo Information Widget Configuration
---
No registration is required at all! See [https://open-meteo.com/en/docs](https://open-meteo.com/en/docs)
Homepage's recommended weather widget. No registration is required at all! See [https://open-meteo.com/en/docs](https://open-meteo.com/en/docs)
```yaml
- openmeteo:

View file

@ -1,22 +0,0 @@
---
title: Weather API
description: Weather API Information Widget Configuration
---
**Note: this widget is considered 'deprecated' since there is no longer a free Weather API tier for new members. See the openmeteo or openweathermap widgets for alternatives.**
The free tier is all that's required, you will need to [register](https://www.weatherapi.com/signup.aspx) and grab your API key.
```yaml
- weatherapi:
label: Kyiv # optional
latitude: 50.449684
longitude: 30.525026
units: metric # or imperial
apiKey: yourweatherapikey
cache: 5 # Time in minutes to cache API responses, to stay within limits
format: # optional, Intl.NumberFormat options
maximumFractionDigits: 1
```
You can optionally not pass a `latitude` and `longitude` and the widget will use your current location (requires a secure context, eg. HTTPS).