From 70b51ff8da06ef83fa51404fca81f443281e9531 Mon Sep 17 00:00:00 2001 From: the-digital-anarchist Date: Thu, 15 Sep 2022 14:04:59 +0200 Subject: [PATCH] adds documentation --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/README.md b/README.md index 0721ec1..e9edaa8 100644 --- a/README.md +++ b/README.md @@ -85,3 +85,53 @@ After a `git pull`, you may need to run `pip install git+https://git.autonomic.z ### Deploy a new `feeds_list.txt` Increment the `_v` (e.g. `v1` -> `v2`) in [`compose.yml`](./compose.yml) `configs` to avoid any deployment error. + +#### Adding a leaflet map to a page + +To add a new leaflet map use the shortcode: +``` +{{< map geoJson="data/geojsonContributors.json">}} +``` +This way you can display a map on any page with any data. + +To add data to the map, add a new json file to the `data/` directory and use the [geojson datascructure](https://geojson.org/) in the json file. +Then point the `geoJson="data/newfile.json"` in the shortcode to the new file. + +If you wanna display new tekst in the tooltips just add a new property key/value. + +e.g. + +``` + "properties": { + "a": "new value", + } +``` +One catcha is that Javascipt always output the order of the object in alfabetic order, there is nothing to do about this. + +Key names `groupName` and `listOfNames` are reserved. +This will display it in the way it does now on the map +e.g. +``` +"properties": { + "groupName": "The Question of Funding", + "listOfNames": [ + "Adele Jarrar", + "Amany Khalifa", + ] +} +``` +So just to be clear if you want extra value under it, give the key name a letter that is after the `l` in the alfabet. +e.g. +``` +"properties": { + "groupName": "The Question of Funding", + "listOfNames": [ + "Adele Jarrar", + "Amany Khalifa", + ], + "m": "value under the list" +} +``` + +The new added value will alway be displayed the same and will be in a `

` tag. +