From 9a3724f3ae8f4ef50a5b97fdb0e7ccffc8a2fc6f Mon Sep 17 00:00:00 2001 From: Tigerfell Date: Sat, 15 Jun 2019 11:44:49 +0200 Subject: [PATCH] Add MultiMaps extension to primary wiki Closes #241 --- cookbooks/wiki/recipes/default.rb | 7 +++++++ .../default/mw-ext-MultiMaps.inc.php.erb | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 cookbooks/wiki/templates/default/mw-ext-MultiMaps.inc.php.erb diff --git a/cookbooks/wiki/recipes/default.rb b/cookbooks/wiki/recipes/default.rb index 455d8ede1..c657bb706 100644 --- a/cookbooks/wiki/recipes/default.rb +++ b/cookbooks/wiki/recipes/default.rb @@ -99,6 +99,13 @@ mediawiki_extension "TimedMediaHandler" do site "wiki.openstreetmap.org" end +mediawiki_extension "MultiMaps" do + site "wiki.openstreetmap.org" + template "mw-ext-MultiMaps.inc.php.erb" + template_cookbook "wiki" + variables :thunderforest_key => passwords["thunderforest"] +end + cookbook_file "/srv/wiki.openstreetmap.org/osm_logo_wiki.png" do owner node[:mediawiki][:user] group node[:mediawiki][:group] diff --git a/cookbooks/wiki/templates/default/mw-ext-MultiMaps.inc.php.erb b/cookbooks/wiki/templates/default/mw-ext-MultiMaps.inc.php.erb new file mode 100644 index 000000000..7d214127b --- /dev/null +++ b/cookbooks/wiki/templates/default/mw-ext-MultiMaps.inc.php.erb @@ -0,0 +1,17 @@ + [ + 'service' => 'Leaflet', + 'attribution' => '© OpenStreetMap contributors. Tiles courtesy of Andy Allan', + 'source' => 'https://tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey=<%= @thunderforest_key %>', + ], +]; -- 2.43.2