From 21993add48d68d640f8ea92acb4de8179086a1ee Mon Sep 17 00:00:00 2001 From: Skyler Grey Date: Sun, 4 Jan 2026 11:37:47 +0000 Subject: [PATCH] feat(pm/wiki): enable mobile support Change-Id: lqpoylmmumyokmtpxvzoyovqyrxzvynw By default, there's no good mobile skin for Mediawiki. You can load "minerva", which appears to come bundled but not by-default-enabled, but there's no auto-switching to it when on mobile devices. The MobileFrontend plugin (as used on Wikipedia) fixes this by using minerva on mobile devices and a different theme on desktop. --- npins/sources.json | 12 ++++++++++++ packetmix/systems/teal/wiki.nix | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/npins/sources.json b/npins/sources.json index 5ecb3f3a..5a681539 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -102,6 +102,18 @@ "url": null, "hash": "sha256-nPShvlf9GizwfzZstFhj4mv3DcHg8leN+zfiv9kETAg=" }, + "MobileFrontend": { + "type": "Git", + "repository": { + "type": "Git", + "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/MobileFrontend" + }, + "branch": "REL1_45", + "submodules": false, + "revision": "2bccb7e19bbe154ac24eae97137ce5396d63339d", + "url": null, + "hash": "sha256-X4vq7SnGQZMBjDDCv6ZRllnDzJ/QmKoA2REkC/2jm+g=" + }, "NamespacePreload": { "type": "Git", "repository": { diff --git a/packetmix/systems/teal/wiki.nix b/packetmix/systems/teal/wiki.nix index 570e6417..5056cd87 100644 --- a/packetmix/systems/teal/wiki.nix +++ b/packetmix/systems/teal/wiki.nix @@ -70,6 +70,7 @@ }/share/php/Elastica"; # needed for cirrussearch Linter = null; Math = null; + MobileFrontend = project.inputs.MobileFrontend.src; NamespacePreload = project.inputs.NamespacePreload.src; Network = "${ config.services.phpfpm.pools.mediawiki.phpPackage.buildComposerProject { @@ -222,6 +223,10 @@ $wgFixDoubleRedirects = true; + $wgMFAutodetectMobileView = true; + $wgMFEnableMobilePreferences = true; + wfLoadSkin( 'MinervaNeue' ); + $wgShowExceptionDetails = true; $wgDevelopmentWarnings = true; ''; -- 2.43.0