Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (32 sloc) 1.63 KB

OpenStreetMap shortcode for hugo

Build Status

Getting started

Run from the root of your Hugo site:

$ git clone 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 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.

Creating and including a map

First create a map for free on 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 (default auto)
  • coordY (default auto)
  • scale (default auto)
  • scaleControl (default true)
  • miniMap (default false)
  • scrollWheelZoom (default true)
  • zoomControl (default true)
  • allowEdit (default false)
  • moreControl (default true)
  • searchControl (default true)
  • tilelayersControl (default null)
  • embedControl (default null)
  • datalayersControl (default true)
  • onLoadPanel (default none)
  • captionBar (default true)
You can’t perform that action at this time.