welpo / tabi

A modern Zola theme with search, multilingual support, optional JavaScript, a perfect Lighthouse score, and a focus on accessibility.
https://welpo.github.io/tabi/
MIT License
97 stars 32 forks source link

Add OSM map (Leaflet) to Tabi #313

Closed stalkerGH closed 1 month ago

stalkerGH commented 1 month ago

I'd like to add Openstreetmap maps to my blog post, preferably in Leaflet library. I have done it in "normal" HTML but I don't know how to do it in Zola and Tabi. Maybe it is built-in Zola's feature but I don't know how to call it.

welpo commented 1 month ago

You can add HTML directly on your posts, and it'll be rendered normally. Have you tried that?

One issue you might encounter is related to CSP: you might need to allow the OpenStreetMap connection or disable CSP.

stalkerGH commented 1 month ago

Thank you. I added IFRAME code generated by OSM.org and the frame was visible but no content. I added OSM to CSP rules and it works now. Thank you!

stalkerGH commented 1 month ago

My problem is solved so I close the issue.

welpo commented 1 month ago

No problem! Glad to hear you solved it :)