tchinchow / story-customized

Beautiful responsive Hugo blog theme focused on simplicity and elegance, with many extra features including presentations, math typesetting, mermaidJs flowcharts, image carousels, maps & GPX, integration, embedded video player, music notation, and search.
https://story-customized.tchinchow.net/
MIT License
0 stars 0 forks source link

[FEATURE] Maps and GPX #2

Closed tchinchow closed 3 years ago

tchinchow commented 4 years ago

Feature Description: Add the possibility to include maps and GPX tracks in blog posts.

Implementation options: Libraries like Leaflet have already been added to Hugo (see hugo-leaflet project).

This feature merely consist in merging & integrating this work with Story.

Fitting with Story's design? Story already let you add a link to a place in the talks template (the "venue" link). We plan on going a little further here as we'd allow integrating maps with markers directly in the articles body.

This would also open a whole lot of new possibilities for illustrating articles' content.

tchinchow commented 3 years ago

The current implementation requires that the user explicitly declares that he/she wants to use the feature-leaflet feature.

We may want to simplify this behaviour by automatically detecting when the leaflet shortcode is used within the page then include all required JS+CSS on behalf of the user without requiring any further actions from him/her.

We may use something like:

{{ if .HasShortcode "leaflet-map" }}
tchinchow commented 3 years ago

Feature has been merged into master and looks OK.