README.md: Document the apiKey configuration option

This commit is contained in:
Martin Rubli
2025-04-15 17:15:14 +02:00
parent 1c8bce4a66
commit 67efbb6661

View File

@@ -192,3 +192,25 @@ maxHeight:
Note: Elevation profiles are only supported if exactly one track is present.
```
### Configuration options
There are a number of module-specific options you can add to your site configuration under the `params.modules.leaflet` key.
For example, in a YAML config file:
```yaml
params:
modules:
leaflet:
com_thunderforest_outdoors:
apiKey: YOUR_API_KEY_GOES_HERE
com_thunderforest_cycle:
apiKey: YOUR_API_KEY_GOES_HERE
com_thunderforest_landscape:
apiKey: YOUR_API_KEY_GOES_HERE
```
| Key | Description |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<layer_id>.apiKey` | API key for the layer with the given ID. Note that the layer ID is the same as in the `leaflet-layer` shortcode options but with dots replaced with underscores. If the API is specified in the configuration _and_ the shortcode options, the latter takes precedence. |