adds documentation

This commit is contained in:
the-digital-anarchist 2022-09-15 14:04:59 +02:00
parent 04fdb8cb2e
commit 70b51ff8da
1 changed files with 50 additions and 0 deletions

View File

@ -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<n>` (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 `<p>` tag.