Skip to content

Commit

Permalink
Add MultiMaps extension to primary wiki
Browse files Browse the repository at this point in the history
Closes #241
Tigerfell authored and tomhughes committed Jun 18, 2019
1 parent 8aa5225 commit 9a3724f
Showing 2 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cookbooks/wiki/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -99,6 +99,13 @@
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]
17 changes: 17 additions & 0 deletions cookbooks/wiki/templates/default/mw-ext-MultiMaps.inc.php.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
# DO NOT EDIT - This file is being maintained by Chef

require_once "$IP/extensions/MultiMaps/MultiMaps.php";

# Array of String. Array containing all the mapping services that will be made available to the user.
# First value - default service, which will be used if the service is not in the parameters
# Values may be a valid name of class based on class BaseMapService or some string and an array if they
# denote different tiles within a BaseMapService
$egMultiMaps_MapServices = [
'Leaflet',
'transport' => [
'service' => 'Leaflet',
'attribution' => '&copy; <a href="https://osm.org/copyright">OpenStreetMap contributors</a>. Tiles courtesy of <a href="https://www.thunderforest.com/" target="_blank">Andy Allan</a>',
'source' => 'https://tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey=<%= @thunderforest_key %>',
],
];

0 comments on commit 9a3724f

Please sign in to comment.