aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/mw-backend/templates/etc
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-08-12 19:31:33 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-08-12 19:34:05 +0200
commit919fb012058e375e7a570aea3be8efe102d22e74 (patch)
tree6a940aa2df809e1479d144375de45ee27301e5a9 /ansible/roles/mw-backend/templates/etc
parentfe67b23917a17ec111788db6520ea3b6ca7a5422 (diff)
downloadinfra-919fb012058e375e7a570aea3be8efe102d22e74.tar.gz
infra-919fb012058e375e7a570aea3be8efe102d22e74.tar.bz2
infra-919fb012058e375e7a570aea3be8efe102d22e74.tar.xz
infra-919fb012058e375e7a570aea3be8efe102d22e74.zip
Refreshing mw setup:
o Moving under /wiki. o Fixing broken poweredby-logo for SMW. o Fixing broken /etc/hosts. o Adding Board namespace.
Diffstat (limited to 'ansible/roles/mw-backend/templates/etc')
-rw-r--r--ansible/roles/mw-backend/templates/etc/mediawiki/LocalSettings.php.j218
1 files changed, 12 insertions, 6 deletions
diff --git a/ansible/roles/mw-backend/templates/etc/mediawiki/LocalSettings.php.j2 b/ansible/roles/mw-backend/templates/etc/mediawiki/LocalSettings.php.j2
index 4c3bd24..7526d05 100644
--- a/ansible/roles/mw-backend/templates/etc/mediawiki/LocalSettings.php.j2
+++ b/ansible/roles/mw-backend/templates/etc/mediawiki/LocalSettings.php.j2
@@ -26,7 +26,8 @@ $wgMetaNamespace = "Project";
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
-$wgScriptPath = "";
+$wgScriptPath = "/w";
+$wgArticlePath = "/wiki/$1";
## The protocol and server name to use in fully-qualified URLs
$wgServer = "https://mw.trygvis.io";
@@ -129,10 +130,7 @@ wfLoadSkin( 'Vector' );
# The following extensions were automatically enabled:
wfLoadExtension( 'Cite' );
wfLoadExtension( 'ParserFunctions' );
-
-
-require_once "/opt/mediawiki/semantic-media-wiki/vendor/autoload.php";
-
+wfLoadExtension( 'SemanticMediaWiki' );
# End of automatically generated settings.
# Add more configuration options below.
@@ -161,8 +159,11 @@ $wgUseCategoryBrowser = true;
// Define constants for my additional namespaces.
define("NS_CHIP", 3000); // This MUST be even.
define("NS_CHIP_TALK", 3001); // This MUST be the following odd integer.
+define("NS_BOARD", 3002); // This MUST be even.
+define("NS_BOARD_TALK", 3003); // This MUST be the following odd integer.
+
+enableSemantics( 'https://mw.trygvis.io/wiki/', true );
-enableSemantics( 'https://mw.trygvis.io/', true );
$smwgShowFactbox = SMW_FACTBOX_NONEMPTY;
// Add "Chip" namespace
@@ -171,5 +172,10 @@ $wgExtraNamespaces[NS_CHIP_TALK] = "Chip_talk"; // Note underscores in the names
$wgContentNamespaces[] = NS_CHIP;
$smwgNamespacesWithSemanticLinks[NS_CHIP] = true;
+$wgExtraNamespaces[NS_BOARD] = "Board";
+$wgExtraNamespaces[NS_BOARD_TALK] = "Board_talk"; // Note underscores in the namespace name.
+$wgContentNamespaces[] = NS_BOARD;
+$smwgNamespacesWithSemanticLinks[NS_BOARD] = true;
+
# https://www.mediawiki.org/wiki/Manual:$wgSMTP
$wgSMTP = array('host' => '10.0.3.1', 'auth' => false);