As per the documentation on Jekyll, it is mentioned that you can access YAML, JSON, and CSV files located in the `_data` directory using `{{ site.data.filename }}`.
I have a geoJson file named `chapters.json` which consists of point features. While I am able to access the file, I encounter some unusual characters when using it in my JavaScript.
Here is an excerpt from the `chapters.json` file:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"title": "MaptimeBER"
},
"geometry": {
"type": "Point",
"coordinates": [
13.391,
52.521
]
}
},
{...}
]
}
For instance, when Jekyll processes the following:
var chapters = {{ site.data.chapters }};
The resulting JavaScript is:
var chapters = {"type"=>"FeatureCollection", "features"=>[{"type"=>"Feature", "properties"=> ...
I am wondering why the colon between key-value pairs changes to =>
? This modification is causing my JavaScript code to fail.