From 919fb012058e375e7a570aea3be8efe102d22e74 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 12 Aug 2018 19:31:33 +0200 Subject: Refreshing mw setup: o Moving under /wiki. o Fixing broken poweredby-logo for SMW. o Fixing broken /etc/hosts. o Adding Board namespace. --- .../templates/etc/mediawiki/LocalSettings.php.j2 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'ansible/roles/mw-backend/templates/etc') 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); -- cgit v1.2.3