Hello,
First, I need to confess that I'm new with Javascript.
That being said, here is what I want to achieve :
A page "Tourism". On that page, two things :
- A google maps with multiple markers
- A list of those markers, with one picture, a heading and a subheading for each.
When I'll click on one item in the list, or on one of the marker, it will link to a page, with a full description of the marker. (image, heading, subheading, text)
I thought to do it like that :
Tourism/
marker-01/
marker.md
marker-02/
marker.md
marker-03/
marker.md
tourism.md
On the page tourism, I'll list my markers with :
content:
items: @self.children
In every marker.md, I'll have a frontmatter with :
heading
subheading
img
location
So the question, is it possible to access to those frontmatters with ajax, to get the data I need to generate the google maps ?
I would need, first, to loop in each sub folder of the page tourism, read the marker.md and get the variables "heading", "subheading", etc....
Is it a good way to achieve that ?
Or should I think of an ohter way ?
I'm not asking for a ready made solution, I just want to know if it's possible and if you think that it's a good way of doing it. I'm eager to learn, but if I can learn something new for me and have a result... it's even better.
Thanks in advance for all your advise !