Run from the root of your Hugo site:
$ git clone https://github.com/Hanzei/hugo-component-osm.git themes/osm
Alternatively you can include this repository as a git submodule. This makes it easier to update this theme if you have your Hugo site in git as well. For this you need to run:
$ git submodule add https://github.com/Hanzei/hugo-component-osm.git themes/osm
Now you just have to add this theme component to your themes in config.toml
, e.g. theme = ["osm", "base-theme"]
. See the Hugo documentation for more infos.
First create a map for free on https://umap.openstreetmap.fr/en/. Then include this map by using the openstreetmap
shortcode, e.g. {{< openstreetmap mapName="demo-map_1" >}}
The only required parameter is mapName
. All other parameters are completely optional.
Available parameter are:
coordX
(defaultauto
)coordY
(defaultauto
)scale
(defaultauto
)scaleControl
(defaulttrue
)miniMap
(defaultfalse
)scrollWheelZoom
(defaulttrue
)zoomControl
(defaulttrue
)allowEdit
(defaultfalse
)moreControl
(defaulttrue
)searchControl
(defaulttrue
)tilelayersControl
(defaultnull
)embedControl
(defaultnull
)datalayersControl
(defaulttrue
)onLoadPanel
(defaultnone
)captionBar
(defaulttrue
)