altrdev / hugo-leaflet

Hugo Shortcodes for inserting a OSM Map, Marker or Track into your posts by using leaflet
MIT License
56 stars 10 forks source link

make hugo-leaflet as a hugo theme component and simplify the use of shortcode #6

Closed hemanthgu closed 1 year ago

hemanthgu commented 2 years ago

Just focused on bringing this hugo leaflet as a theme component to any existing theme.

adding this repo as sub-component is as simple as: git submodule add https://github.com/altrdev/hugo-leaflet.git themes/hugo-leaflet

and update the site config.yamlwith

theme:
  - hugo-leaflet
  - base-theme

changes are related to this commit.

altrdev commented 1 year ago

Merged but some problems occured when you use multiple shortcut in the same page. The html is loaded multiple times

altrdev commented 1 year ago

Reverted, because with multiple map in page error occurred (already defined obj from loader). If you find another way for loading the partial file, I can review again PR