From 67efbb66610122a922b107f00d33ad61501fb014 Mon Sep 17 00:00:00 2001 From: Martin Rubli Date: Tue, 15 Apr 2025 17:15:14 +0200 Subject: [PATCH] README.md: Document the apiKey configuration option --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index c314148..588ecb4 100644 --- a/README.md +++ b/README.md @@ -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 | +| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `.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. |